commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5e710a6f1c99/ changeset: 5e710a6f1c99 user: inithello date: 2013-01-16 18:35:36 summary: Fix for removing roles from users in the tool shed. affected #: 1 file diff -r 4f01c6a8693e855da6abad43112afe7447da6e82 -r 5e710a6f1c99e56abb5eb7964cd1c673526866b2 lib/galaxy/web/base/controllers/admin.py --- a/lib/galaxy/web/base/controllers/admin.py +++ b/lib/galaxy/web/base/controllers/admin.py @@ -224,19 +224,20 @@ role = get_role( trans, id ) if params.get( 'role_members_edit_button', False ): in_users = [ trans.sa_session.query( trans.app.model.User ).get( x ) for x in util.listify( params.in_users ) ] - for ura in role.users: - user = trans.sa_session.query( trans.app.model.User ).get( ura.user_id ) - if user not in in_users: - # Delete DefaultUserPermissions for previously associated users that have been removed from the role - for dup in user.default_permissions: - if role == dup.role: - trans.sa_session.delete( dup ) - # Delete DefaultHistoryPermissions for previously associated users that have been removed from the role - for history in user.histories: - for dhp in history.default_permissions: - if role == dhp.role: - trans.sa_session.delete( dhp ) - trans.sa_session.flush() + if trans.webapp.name == 'galaxy': + for ura in role.users: + user = trans.sa_session.query( trans.app.model.User ).get( ura.user_id ) + if user not in in_users: + # Delete DefaultUserPermissions for previously associated users that have been removed from the role + for dup in user.default_permissions: + if role == dup.role: + trans.sa_session.delete( dup ) + # Delete DefaultHistoryPermissions for previously associated users that have been removed from the role + for history in user.histories: + for dhp in history.default_permissions: + if role == dhp.role: + trans.sa_session.delete( dhp ) + trans.sa_session.flush() in_groups = [ trans.sa_session.query( trans.app.model.Group ).get( x ) for x in util.listify( params.in_groups ) ] trans.app.security_agent.set_entity_role_associations( roles=[ role ], users=in_users, groups=in_groups ) trans.sa_session.refresh( role ) https://bitbucket.org/galaxy/galaxy-central/commits/974d7c41b8df/ changeset: 974d7c41b8df user: inithello date: 2013-01-16 18:36:19 summary: Fix server error when trying to create a component review for a repository when one already exists for that changeset revision. affected #: 1 file diff -r 5e710a6f1c99e56abb5eb7964cd1c673526866b2 -r 974d7c41b8dfb7e77c6dfa24da05b31d684fd2e6 lib/galaxy/webapps/community/controllers/repository_review.py --- a/lib/galaxy/webapps/community/controllers/repository_review.py +++ b/lib/galaxy/webapps/community/controllers/repository_review.py @@ -377,6 +377,7 @@ if repository_id: if changeset_revision: # Make sure there is not already a review of the revision by the user. + repository = suc.get_repository_in_tool_shed( trans, repository_id ) if common.get_review_by_repository_id_changeset_revision_user_id( trans=trans, repository_id=repository_id, changeset_revision=changeset_revision, @@ -384,7 +385,6 @@ message = "You have already created a review for revision <b>%s</b> of repository <b>%s</b>." % ( changeset_revision, repository.name ) status = "error" else: - repository = suc.get_repository_in_tool_shed( trans, repository_id ) # See if there are any reviews for previous changeset revisions that the user can copy. if not create_without_copying and not previous_review_id and common.has_previous_repository_reviews( trans, repository, changeset_revision ): return trans.response.send_redirect( web.url_for( controller='repository_review', Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket