Skip to content

Commit

Permalink
Don't allow read access to "public" sets; this is a holdover from old…
Browse files Browse the repository at this point in the history
…en tymes and has the effect in current versions of Pawtucket that any front-end created set is readable by

any user. This was intentional once upon a time but is definitely counter intuitive and undesirable in the current UI
  • Loading branch information
collectiveaccess committed Oct 27, 2021
1 parent 73a2071 commit 2c2e931
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/ca_sets.php
Expand Up @@ -7,7 +7,7 @@
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2009-2019 Whirl-i-Gig
* Copyright 2009-2021 Whirl-i-Gig
*
* For more information visit http://www.CollectiveAccess.org
*
Expand Down Expand Up @@ -1016,10 +1016,6 @@ public function haveAccessToSet($pn_user_id, $pn_access, $pn_set_id=null, $pa_op
return ca_sets::$s_have_access_to_set_cache[$vn_set_id.'/'.$pn_user_id.'/'.$pn_access] = true;
}

if (($t_set->get('access') > 0) && ($pn_access == __CA_SET_READ_ACCESS__)) { // public sets are readable by all
return ca_sets::$s_have_access_to_set_cache[$vn_set_id.'/'.$pn_user_id.'/'.$pn_access] = true;
}

//
// If user is admin or has set admin privs allow them access to the set
//
Expand Down

0 comments on commit 2c2e931

Please sign in to comment.