diff options
author | Joas Schilling <coding@schilljs.com> | 2021-09-22 17:59:41 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-07 19:18:30 +0300 |
commit | 1b13f80cc119eb386afe72866e6f4f8f9537c471 (patch) | |
tree | fbaa50ec2d584fccc828e9359323d0a99c7f398d /lib/Model | |
parent | 390ae657a18523bb0b39f6531fa27de9bb075410 (diff) |
Allow to remove all permissions without falling back to the next level
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Attendee.php | 15 | ||||
-rw-r--r-- | lib/Model/AttendeeMapper.php | 1 | ||||
-rw-r--r-- | lib/Model/SelectHelper.php | 4 |
3 files changed, 12 insertions, 8 deletions
diff --git a/lib/Model/Attendee.php b/lib/Model/Attendee.php index d83345519..2e7a0a3d9 100644 --- a/lib/Model/Attendee.php +++ b/lib/Model/Attendee.php @@ -68,13 +68,14 @@ class Attendee extends Entity { public const ACTOR_BRIDGED = 'bridged'; public const ACTOR_FEDERATED_USERS = 'federated_users'; - public const PERMISSIONS_NONE = 0; - public const PERMISSIONS_PUBLISH_AUDIO = 1; - public const PERMISSIONS_PUBLISH_VIDEO = 2; - public const PERMISSIONS_PUBLISH_SCREEN = 4; - public const PERMISSIONS_CALL_START = 8; - public const PERMISSIONS_CALL_JOIN = 16; - public const PERMISSIONS_LOBBY_IGNORE = 32; + public const PERMISSIONS_DEFAULT = 0; + public const PERMISSIONS_CUSTOM = 1; + public const PERMISSIONS_CALL_START = 2; + public const PERMISSIONS_CALL_JOIN = 4; + public const PERMISSIONS_LOBBY_IGNORE = 8; + public const PERMISSIONS_PUBLISH_AUDIO = 16; + public const PERMISSIONS_PUBLISH_VIDEO = 32; + public const PERMISSIONS_PUBLISH_SCREEN = 64; public const PUBLISHING_PERMISSIONS_ALL = 7; diff --git a/lib/Model/AttendeeMapper.php b/lib/Model/AttendeeMapper.php index 174ca2d6e..8d3411847 100644 --- a/lib/Model/AttendeeMapper.php +++ b/lib/Model/AttendeeMapper.php @@ -216,6 +216,7 @@ class AttendeeMapper extends QBMapper { } if ($mode === Participant::PERMISSIONS_MODIFY_SET) { + $newState |= Attendee::PERMISSIONS_CUSTOM; $query->set('permissions', $query->createNamedParameter($newState, IQueryBuilder::PARAM_INT)); $query->executeStatement(); } else { diff --git a/lib/Model/SelectHelper.php b/lib/Model/SelectHelper.php index a42097f6e..4ef5fec4f 100644 --- a/lib/Model/SelectHelper.php +++ b/lib/Model/SelectHelper.php @@ -42,6 +42,8 @@ class SelectHelper { ->addSelect($alias . 'password') ->addSelect($alias . 'active_guests') ->addSelect($alias . 'active_since') + ->addSelect($alias . 'default_permissions') + ->addSelect($alias . 'call_permissions') ->addSelect($alias . 'call_flag') ->addSelect($alias . 'last_activity') ->addSelect($alias . 'last_message') @@ -71,7 +73,7 @@ class SelectHelper { ->addSelect($alias . 'last_mention_message') ->addSelect($alias . 'last_mention_direct') ->addSelect($alias . 'read_privacy') - ->addSelect($alias . 'publishing_permissions') + ->addSelect($alias . 'permissions') ->addSelect($alias . 'access_token') ->addSelect($alias . 'remote_id') ->selectAlias($alias . 'id', 'a_id'); |