Actions have been reduced to 3, and the public group is now the one named

'public' (names, for now, will be unique).
This commit is contained in:
Nate Coraor
2008-08-11 16:58:48 -04:00
parent 85909a2aad
commit dc9ffe6860
2 changed files with 4 additions and 12 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ class Group( object ):
def guess_public_group( cls ):
# TODO, Nate: Make sure this method is functionally correct.
#retrieve from database and store public group id, assume first created group is public
cls.set_public_group( Group.select( order_by = Group.table.c.create_time )[0] )
cls.set_public_group( Group.select_by( name = 'public' ) )
class UserGroupAssociation( object ):
def __init__( self, user, group ):
+3 -11
View File
@@ -14,17 +14,9 @@ log = logging.getLogger(__name__)
class RBACAgent:
"""Class that handles galaxy security"""
permitted_actions = Bunch(
dataset_actions = Bunch( VIEW = 'dataset_view', #viewing/downloading
USE = 'dataset_use', #use in jobs
ADD_GROUP = 'dataset_add_group', #dataset can be added to groups
REMOVE_GROUP = 'dataset_remove_group' #dataset can be removed from groups
),
group_actions = Bunch( ADD_DATASET = 'group_add_dataset', #add dataset to group
REMOVE_DATASET = 'group_remove_dataset', #remove dataset from group
DELETE = 'group_delete', #delete a group
ADD_USER = 'group_add_user', #add users to group
REMOVE_USER = 'group_remove_user' #remove user from group
)
EDIT_METADATA = 'edit_metadata',
MANAGE_PERMISSIONS = 'manage_permissions',
ACCESS = 'access'
)
def allow_action( self, user, action, **kwd ):
raise 'No valid method of checking action (%s) on %s for user %s.' % ( action, kwd, user )