1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Adding some more ACL

This commit is contained in:
Tim Düsterhus 2012-03-03 22:00:54 +01:00
parent b103dff5f9
commit a484c6d9c3
2 changed files with 29 additions and 3 deletions

View File

@ -1,9 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/aclOption.xsd">
<import>
<options>
<option name="canEnter">
<categories>
<category name="user">
<objecttype>timwolla.wcf.chat.room</objecttype>
</category>
<category name="mod">
<objecttype>timwolla.wcf.chat.room</objecttype>
</category>
</categories>
<options>
<option name="user.canEnter">
<objecttype>timwolla.wcf.chat.room</objecttype>
<categoryname>user</categoryname>
</option>
<option name="user.canWrite">
<objecttype>timwolla.wcf.chat.room</objecttype>
<categoryname>user</categoryname>
</option>
<option name="mod.canAlwaysEnter">
<objecttype>timwolla.wcf.chat.room</objecttype>
<categoryname>mod</categoryname>
</option>
<option name="mod.canAlwaysWrite">
<objecttype>timwolla.wcf.chat.room</objecttype>
<categoryname>mod</categoryname>
</option>
</options>
</import>

View File

@ -136,6 +136,8 @@ public function getUsers() {
* @return boolean
*/
public function canEnter() {
return \wcf\system\chat\permission\ChatPermissionHandler::getInstance()->getPermission($this, 'canEnter');
$ph = \wcf\system\chat\permission\ChatPermissionHandler::getInstance();
return $ph->getPermission($this, 'canEnter') || $ph->getPermission($this, 'canAlwaysEnter');
}
}