Skip to content

Commit

Permalink
Revise admin groups endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 8, 2017
1 parent 71db6b4 commit c72aca4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions client/galaxy/scripts/apps/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ window.app = function app( options, bootstrapped ){
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/roles_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_groups: function() {
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/groups_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_forms : function( form_id ) {
var form_defs = {
reset_user_password: {
Expand Down
3 changes: 2 additions & 1 deletion client/galaxy/scripts/apps/panels/admin-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ var AdminPanel = Backbone.View.extend({
target : '__use_router__'
},{
title : 'Groups',
url : 'admin/groups'
url : 'admin/groups',
target : '__use_router__'
},{
title : 'Roles',
url : 'admin/roles',
Expand Down
1 change: 1 addition & 0 deletions lib/galaxy/webapps/galaxy/buildapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def paste_app_factory( global_conf, **kwargs ):

webapp.add_client_route( '/admin/users', 'admin' )
webapp.add_client_route( '/admin/roles', 'admin' )
webapp.add_client_route( '/admin/groups', 'admin' )
webapp.add_client_route( '/admin/forms/{form_id}', 'admin' )
webapp.add_client_route( '/tours' )
webapp.add_client_route( '/tours/{tour_id}' )
Expand Down
5 changes: 3 additions & 2 deletions lib/galaxy/webapps/galaxy/controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,9 +1223,9 @@ def purge_role( self, trans, ids ):
message += " %s " % role.name
return ( message, "done" )

@web.expose
@web.expose_api
@web.require_admin
def groups( self, trans, **kwargs ):
def groups_list( self, trans, **kwargs ):
if 'operation' in kwargs:
operation = kwargs[ 'operation' ].lower().replace( '+', ' ' )
if operation == "groups":
Expand All @@ -1243,6 +1243,7 @@ def groups( self, trans, **kwargs ):
if operation == "rename":
return self.rename_group( trans, **kwargs )
# Render the list view
kwargs[ 'dict_format' ] = True
return self.group_list_grid( trans, **kwargs )

@web.expose
Expand Down
6 changes: 3 additions & 3 deletions static/scripts/bundled/admin.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/admin.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

0 comments on commit c72aca4

Please sign in to comment.