2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a66e4111ba2a/
Changeset: a66e4111ba2a
Branch: next-stable
User: carlfeberhard
Date: 2014-02-06 19:21:24
Summary: Fix: HDA API show on imported, non-shared histories (thanks, John Chilton)
Affected #: 1 file
diff -r 7dd1f6db0e3ff3affa9a01a63b8c11efbaa2380b -r a66e4111ba2aeca52572d203e1713153a5ee293a lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -616,11 +616,12 @@
check_ownership=False, check_accessible=False )
if check_accessible:
- if not trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ):
+ if( not trans.user_is_admin()
+ and not trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ) ):
error( "You are not allowed to access this dataset" )
- if check_state and hda.state == trans.model.Dataset.states.UPLOAD:
- error( "Please wait until this dataset finishes uploading before attempting to view it." )
+ if check_state and hda.state == trans.model.Dataset.states.UPLOAD:
+ error( "Please wait until this dataset finishes uploading before attempting to view it." )
return hda
def get_history_dataset_association_from_ids( self, trans, id, history_id ):
@@ -646,8 +647,6 @@
check_ownership=True, check_accessible=True )
return hda
-
-
def get_hda_list( self, trans, hda_ids, check_ownership=True, check_accessible=False, check_state=True ):
"""
Returns one or more datasets in a list.
https://bitbucket.org/galaxy/galaxy-central/commits/3db994bbb579/
Changeset: 3db994bbb579
User: carlfeberhard
Date: 2014-02-06 19:21:55
Summary: merge
Affected #: 1 file
diff -r 8922d9e14d83d2bbcb06ea8498b17c2e3ea460b2 -r 3db994bbb5794de782a824b5ea8b2220b99e97ec lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -659,11 +659,12 @@
check_ownership=False, check_accessible=False )
if check_accessible:
- if not trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ):
+ if( not trans.user_is_admin()
+ and not trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ) ):
error( "You are not allowed to access this dataset" )
- if check_state and hda.state == trans.model.Dataset.states.UPLOAD:
- error( "Please wait until this dataset finishes uploading before attempting to view it." )
+ if check_state and hda.state == trans.model.Dataset.states.UPLOAD:
+ error( "Please wait until this dataset finishes uploading before attempting to view it." )
return hda
def get_history_dataset_association_from_ids( self, trans, id, history_id ):
@@ -689,8 +690,6 @@
check_ownership=True, check_accessible=True )
return hda
-
-
def get_hda_list( self, trans, hda_ids, check_ownership=True, check_accessible=False, check_state=True ):
"""
Returns one or more datasets in a list.
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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7dd1f6db0e3f/
Changeset: 7dd1f6db0e3f
Branch: next-stable
User: jmchilton
Date: 2014-02-06 17:48:02
Summary: Bugfix: Allow users to 'unshare' histories shared with them.
Affected #: 1 file
diff -r d557d5dd942f5bbf820e19ec3fe7278401489555 -r 7dd1f6db0e3ff3affa9a01a63b8c11efbaa2380b lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -413,7 +413,9 @@
if not ids:
message = "Select a history to unshare"
return self.shared_list_grid( trans, status='error', message=message, **kwargs )
- histories = [ self.get_history( trans, history_id ) for history_id in ids ]
+ # No need to check security, association below won't yield a
+ # hit if this user isn't having the history shared with her.
+ histories = [ self.get_history( trans, history_id, check_ownership=False ) for history_id in ids ]
for history in histories:
# Current user is the user with which the histories were shared
association = trans.sa_session.query( trans.app.model.HistoryUserShareAssociation ).filter_by( user=trans.user, history=history ).one()
https://bitbucket.org/galaxy/galaxy-central/commits/8922d9e14d83/
Changeset: 8922d9e14d83
User: jmchilton
Date: 2014-02-06 17:48:18
Summary: Merge next-stable.
Affected #: 1 file
diff -r 75a81fcf38c477420f96035c9ed4b27edb55dd94 -r 8922d9e14d83d2bbcb06ea8498b17c2e3ea460b2 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py
@@ -417,7 +417,9 @@
if not ids:
message = "Select a history to unshare"
return self.shared_list_grid( trans, status='error', message=message, **kwargs )
- histories = [ self.get_history( trans, history_id ) for history_id in ids ]
+ # No need to check security, association below won't yield a
+ # hit if this user isn't having the history shared with her.
+ histories = [ self.get_history( trans, history_id, check_ownership=False ) for history_id in ids ]
for history in histories:
# Current user is the user with which the histories were shared
association = trans.sa_session.query( trans.app.model.HistoryUserShareAssociation ).filter_by( user=trans.user, history=history ).one()
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.