1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ae5b674b4342/
changeset: ae5b674b4342
user: greg
date: 2012-10-24 17:27:16
summary: Fix for determing a Checkbox setting when reviewing repositories.
affected #: 1 file
diff -r a239f666d5ba8ce3f24198e7054fdd03ab60ada0 -r ae5b674b4342a87863a17cea8ad3a46adef2b51f 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
@@ -509,7 +509,7 @@
elif component_review_attr == 'comment':
comment = str( v )
elif component_review_attr == 'private':
- private = CheckboxField.is_checked( str( v ) )
+ private = CheckboxField.is_checked( v )
elif component_review_attr == 'approved':
approved = str( v )
elif component_review_attr == 'rating':
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a239f666d5ba/
changeset: a239f666d5ba
user: greg
date: 2012-10-24 17:26:00
summary: Enhance the tool shed security agent to enable restriction of component reviews that have been marked private.
affected #: 1 file
diff -r 409fec0598f944d30f69e9faaac193b71d6541b8 -r a239f666d5ba8ce3f24198e7054fdd03ab60ada0 lib/galaxy/webapps/community/security/__init__.py
--- a/lib/galaxy/webapps/community/security/__init__.py
+++ b/lib/galaxy/webapps/community/security/__init__.py
@@ -170,6 +170,21 @@
repository_reviewer_role = self.get_repository_reviewer_role()
return repository_reviewer_role and repository_reviewer_role in roles
return False
+ def user_can_browse_component_review( self, component_review, user ):
+ if component_review and user:
+ if component_review.private:
+ if self.user_can_review_repositories( user ):
+ # Reviewers can access private component reviews.
+ return True
+ repository_review = component_review.repository_review
+ repository = repository_review.repository
+ if repository.user == user:
+ # The repository owner can access private component reviews.
+ return True
+ return False
+ # The component_review is not marked private.
+ return True
+ return False
def get_permitted_actions( filter=None ):
'''Utility method to return a subset of RBACAgent's permitted actions'''
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/25a93da96e03/
changeset: 25a93da96e03
user: greg
date: 2012-10-24 15:51:17
summary: Override the grid's TextColumn.get_single_filter() method for the BooleanColumn so the BooleanColumn can be used in grids.
affected #: 1 file
diff -r 33db1925e701664785735160f3738dfde97fc2e6 -r 25a93da96e03431557e1418fd4cf70ab7b6ec427 lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py
+++ b/lib/galaxy/web/framework/helpers/grids.py
@@ -418,6 +418,13 @@
def sort( self, trans, query, ascending, column_name=None ):
"""Sort query using this column."""
return GridColumn.sort( self, trans, query, ascending, column_name=column_name )
+ def get_single_filter( self, user, a_filter ):
+ if self.key.find( '.' ) > -1:
+ a_key = self.key.split( '.' )[1]
+ else:
+ a_key = self.key
+ model_class_key_field = getattr( self.model_class, a_key )
+ return model_class_key_field == a_filter
class IntegerColumn( TextColumn ):
"""
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.