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

Improve ACL in ACP

see WoltLab/WCF@c7e6ce11d4

Closes #44
This commit is contained in:
Tim Düsterhus 2013-09-08 14:45:40 +02:00
parent f3d652509d
commit 69a0597984
3 changed files with 9 additions and 8 deletions

View File

@ -1,13 +1,11 @@
{include file='header' pageTitle='chat.acp.room.'|concat:$action} {include file='header' pageTitle='chat.acp.room.'|concat:$action}
<script data-relocate="true" src="{@$__wcf->getPath('wcf')}js/WCF.ACL.js"></script> {include file='aclPermissions'}
<script data-relocate="true"> {if !$roomID|isset}
//<![CDATA[ {include file='aclPermissionJavaScript' containerID='groupPermissions'}
$(function() { {else}
new WCF.ACL.List($('#groupPermissions'), {@$objectTypeID}, ''{if $roomID|isset}, {@$roomID}{/if}); {include file='aclPermissionJavaScript' containerID='groupPermissions' objectID=$roomID}
}); {/if}
//]]>
</script>
<header class="boxHeadline"> <header class="boxHeadline">
<h1>{lang}chat.acp.room.{$action}{/lang}</h1> <h1>{lang}chat.acp.room.{$action}{/lang}</h1>

View File

@ -116,6 +116,7 @@ public function save() {
} }
\wcf\system\acl\ACLHandler::getInstance()->save($roomID, $this->objectTypeID); \wcf\system\acl\ACLHandler::getInstance()->save($roomID, $this->objectTypeID);
\wcf\system\acl\ACLHandler::getInstance()->disableAssignVariables();
\chat\system\permission\PermissionHandler::clearCache(); \chat\system\permission\PermissionHandler::clearCache();
$this->saved(); $this->saved();
@ -137,6 +138,7 @@ public function assignVariables() {
parent::assignVariables(); parent::assignVariables();
I18nHandler::getInstance()->assignVariables(); I18nHandler::getInstance()->assignVariables();
\wcf\system\acl\ACLHandler::getInstance()->assignVariables($this->objectTypeID);
WCF::getTPL()->assign(array( WCF::getTPL()->assign(array(
'action' => 'add', 'action' => 'add',

View File

@ -83,6 +83,7 @@ public function save() {
} }
\wcf\system\acl\ACLHandler::getInstance()->save($this->roomID, $this->objectTypeID); \wcf\system\acl\ACLHandler::getInstance()->save($this->roomID, $this->objectTypeID);
\wcf\system\acl\ACLHandler::getInstance()->disableAssignVariables();
\chat\system\permission\PermissionHandler::clearCache(); \chat\system\permission\PermissionHandler::clearCache();
// update room // update room