aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-17 17:59:46 -0700
committerfriendica <info@friendica.com>2014-09-17 17:59:46 -0700
commit401409357238183702c1628a02ccef6cf0394d72 (patch)
tree3e44b80aaca8fb79c7571aba7bb66f31386eb4ca /include/permissions.php
parentcd790447782c0a7deba56209afc2e6352e004743 (diff)
downloadvolse-hubzilla-401409357238183702c1628a02ccef6cf0394d72.tar.gz
volse-hubzilla-401409357238183702c1628a02ccef6cf0394d72.tar.bz2
volse-hubzilla-401409357238183702c1628a02ccef6cf0394d72.zip
implement permission roles - the backend should be done except for maybe a couple of small tweaks. Now we just need to define the rest of the roles and create a chooser for them. Adam started on this some time back but I don't know where that has gone.
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 8e4676f51..70c682cfc 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -419,11 +419,12 @@ function site_default_perms() {
*
* Given a string for the channel role ('social','forum', etc)
* return an array of all permission fields pre-filled for this role.
- * This includes the channel permission scope indicators as well as
- * perms_auto: The permissions to apply automatically on receipt of a connection request
+ * This includes the channel permission scope indicators (anything beginning with 'channel_') as well as
+ * perms_auto: true or false to create auto-permissions for this channel
* perms_follow: The permissions to apply when initiating a connection request to another channel
* perms_accept: The permissions to apply when accepting a connection request from another channel (not automatic)
- *
+ * default_collection: true or false to make the default ACL include the channel's default collection
+ * directory_publish: true or false to publish this channel in the directory
* Any attributes may be extended (new roles defined) and modified (specific permissions altered) by plugins
*
*/
@@ -436,7 +437,9 @@ function get_role_perms($role) {
switch($role) {
case 'social':
- $ret['perms_auto'] = 0;
+ $ret['perms_auto'] = false;
+ $ret['default_collection'] = false;
+ $ret['directory_publish'] = true;
$ret['perms_follow'] = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
|PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
|PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_A_REPUBLISH|PERMS_W_LIKE;