aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Access/PermissionLimits.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-19 23:44:22 -0700
committerzotlabs <mike@macgirvin.com>2018-04-19 23:44:22 -0700
commitd5c451c4a8e6e21554d69f35ad77a85281f3d2be (patch)
tree1b20e83fa625a93f4fcb881fd22cc6388a3c9b2b /Zotlabs/Access/PermissionLimits.php
parent8d0cbeab388b1a7f3eb426f71c97ff690496005d (diff)
downloadvolse-hubzilla-d5c451c4a8e6e21554d69f35ad77a85281f3d2be.tar.gz
volse-hubzilla-d5c451c4a8e6e21554d69f35ad77a85281f3d2be.tar.bz2
volse-hubzilla-d5c451c4a8e6e21554d69f35ad77a85281f3d2be.zip
This fix needs to go deeper in the code. PermissionLimits::Get is called in a lot of places. If we have no stored setting for a particular permission, return 0 - which is basically no permission except to self.
Diffstat (limited to 'Zotlabs/Access/PermissionLimits.php')
-rw-r--r--Zotlabs/Access/PermissionLimits.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php
index 1d15098fc..e0ee88367 100644
--- a/Zotlabs/Access/PermissionLimits.php
+++ b/Zotlabs/Access/PermissionLimits.php
@@ -74,13 +74,13 @@ class PermissionLimits {
* @param int $channel_id
* @param string $perm (optional)
* @return
- * * \b boolean false if no perm_limits set for this channel
- * * \b int if $perm is set, return one of PERMS_* constants for this permission
+ * * \b false if no perm_limits set for this channel
+ * * \b int if $perm is set, return one of PERMS_* constants for this permission, default 0
* * \b array with all permission limits, if $perm is not set
*/
static public function Get($channel_id, $perm = '') {
if($perm) {
- return PConfig::Get($channel_id, 'perm_limits', $perm);
+ return intval(PConfig::Get($channel_id, 'perm_limits', $perm));
}
PConfig::Load($channel_id);