summaryrefslogtreecommitdiff
path: root/share/gitano/skel/gitano-admin/rules/core.lace
blob: c1bffb72d3e6418d6dc0037a3218d01f2f67d56d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#  _____                   
# |_   _| __ _____   _____ 
#   | || '__/ _ \ \ / / _ \
#   | || | | (_) \ V /  __/
#   |_||_|  \___/ \_/ \___|
#
# Copyright 2012 Codethink Limited
#
# Core ruleset definitions for Trove.

default deny "Trove ruleset failed to define result.  Access denied."

include global:defines

# The users in the administration group (gitano-admin) may do anything
# they choose (providing they're not being impersonated).  By default
# Only the user created as part of trove-setup has this level of access.
allow "Administrators can do anything" is_admin !if_asanother

# Now let's decide if we can use 'as'
include global:aschecks if_asanother

# Operations which are against 'self' get checked next
include global:selfchecks

# Administration operations (users, groups) next
include global:siteadmin op_is_admin

# Site-defined rules for repository creation
include global:createrepo op_createrepo

# Site-defined rules for repository renaming
include global:renamerepo op_renamerepo

# Site-defined rules for repository destruction
include global:destroyrepo op_destroyrepo

# If you're running your access control somewhat more openly than most, You can
# now uncomment the following and allow git:// access to *everything* which is
# not the admin repository
#allow "Anonymous access is okay" op_read !is_admin_repo

# Site-defined rules for project repositories, including admin of them
include global:project

# Now the project rules themselves
include main