Closed sylae closed 8 years ago
Currently we allow anyone to do anything, with a couple hard-coded exceptions. Obviously this is not ideal.
$config['permissions']['example-permission'] = true; // global default $config['rooms']['lounge@conference.calref.net']['permissions']['example-permission'] = false; // room override $config['permissions']['sylae@calref.net']['admin-example-permission'] = true; // user override $config['rooms']['rp@conference.calref.net']['permissions']['sylae@calref.net']['rig-dice'] = false; // don't cheat
Permission masks should be applied in the following order:
Something like this should be a good effect:
$effective_perms = array_merge( $this->c['permissions'], (array_key_exists('permissions', $this->c['rooms'][$room]) ? $this->c['rooms'][$room]['permissions'] : array() ), (array_key_exists($user_jid->bare, $this->c['permissions']) ? $this->c['permissions'][$user_jid->bare] : array() ), (array_key_exists('permissions', $this->c['rooms'][$room] && array_key_exists($user_jid->bare, $this->c['rooms'][$room]['permissions']) ? $this->c['rooms'][$room]['permissions'][$user_jid->bare] : array() ) );
boy, that's a fun bit of code :|
Currently we allow anyone to do anything, with a couple hard-coded exceptions. Obviously this is not ideal.
Permission masks should be applied in the following order:
Something like this should be a good effect:
boy, that's a fun bit of code :|