commit/galaxy-central: greg: Don't allow reviewing empty repositories in the tool shed.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/d0e7bd064cf9/ changeset: d0e7bd064cf9 user: greg date: 2012-11-26 18:09:23 summary: Don't allow reviewing empty repositories in the tool shed. affected #: 3 files diff -r 593c0d6c3d447aaa79c61fea2688b6091b44dda5 -r d0e7bd064cf9a2b991f793c1dc7720430906174f templates/webapps/community/repository/manage_repository.mako --- a/templates/webapps/community/repository/manage_repository.mako +++ b/templates/webapps/community/repository/manage_repository.mako @@ -21,7 +21,7 @@ can_undeprecate = trans.user and ( is_admin or repository.user == trans.user ) and is_deprecated can_reset_all_metadata = not is_deprecated and is_admin and len( repo ) > 0 has_readme = metadata and 'readme' in metadata - can_review_repository = not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user ) + can_review_repository = not is_new and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user ) reviewing_repository = cntrller and cntrller == 'repository_review' if can_push: diff -r 593c0d6c3d447aaa79c61fea2688b6091b44dda5 -r d0e7bd064cf9a2b991f793c1dc7720430906174f templates/webapps/community/repository/view_repository.mako --- a/templates/webapps/community/repository/view_repository.mako +++ b/templates/webapps/community/repository/view_repository.mako @@ -20,7 +20,7 @@ browse_label = 'Browse repository tip files' has_readme = metadata and 'readme' in metadata reviewing_repository = cntrller and cntrller == 'repository_review' - can_review_repository = not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user ) + can_review_repository = not is_new and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user ) %><%! diff -r 593c0d6c3d447aaa79c61fea2688b6091b44dda5 -r d0e7bd064cf9a2b991f793c1dc7720430906174f templates/webapps/community/repository/view_tool_metadata.mako --- a/templates/webapps/community/repository/view_tool_metadata.mako +++ b/templates/webapps/community/repository/view_tool_metadata.mako @@ -8,6 +8,7 @@ from urllib import quote_plus is_admin = trans.user_is_admin() is_new = repository.is_new( trans.app ) + is_deprecated = repository.deprecated can_contact_owner = trans.user and trans.user != repository.user can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository ) can_upload = can_push @@ -21,7 +22,7 @@ else: browse_label = 'Browse repository tip files' has_readme = metadata and 'readme' in metadata - can_review_repository = trans.app.security_agent.user_can_review_repositories( trans.user ) + can_review_repository = not is_new and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user ) %><%! 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