mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-20 16:50:41 -04:00
correctly set some perms when our follow request was accepted
This commit is contained in:
@@ -1333,7 +1333,8 @@ class Activity {
|
||||
}
|
||||
}
|
||||
|
||||
$x = PermissionRoles::role_perms('personal');
|
||||
$role = get_pconfig($channel['channel_id'], 'system', 'permissions_role', 'personal');
|
||||
$x = PermissionRoles::role_perms($role);
|
||||
$their_perms = Permissions::FilledPerms($x['perms_connect']);
|
||||
|
||||
if ($contact && $contact['abook_id']) {
|
||||
@@ -1358,10 +1359,15 @@ class Activity {
|
||||
return;
|
||||
|
||||
case 'Accept':
|
||||
// They accepted our Follow request.
|
||||
// Set default permissions except for send_stream and post_wall
|
||||
|
||||
// They accepted our Follow request - set default permissions
|
||||
|
||||
set_abconfig($channel['channel_id'], $contact['abook_xchan'], 'system', 'their_perms', $their_perms);
|
||||
foreach ($their_perms as $k => $v) {
|
||||
if(in_array($k, ['send_stream', 'post_wall'])) {
|
||||
$v = 0; // Those will be set once we accept their follow request
|
||||
}
|
||||
set_abconfig($channel['channel_id'], $contact['abook_xchan'], 'their_perms', $k, $v);
|
||||
}
|
||||
|
||||
$abook_instance = $contact['abook_instance'];
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ function photo_upload($channel, $observer, $args) {
|
||||
}
|
||||
|
||||
$ac = $acl->get();
|
||||
hz_syslog(print_r($ac,true));
|
||||
$width = $height = 0;
|
||||
|
||||
if ($args['getimagesize']) {
|
||||
|
||||
Reference in New Issue
Block a user