How can I make this plugin ONLY for Admin?
DogHam
✭
I'm using v2.1b2 version and the version 0.5 of cleditor plugin.
0
DogHam
✭
I'm using v2.1b2 version and the version 0.5 of cleditor plugin.
Comments
I think this is where you need to add those, but I may be off(more than likely). You can compare how other plugins have it or experiment.
class cleditorPlugin extends Gdn_Plugin { public function PostController_Render_Before($Sender) { $IsAdmin = Gdn::Session()->CheckPermission('Garden.Users.Edit'); if(!$IsAdmin) return; $this->_AddCLEditor($Sender); } public function DiscussionController_Render_Before($Sender) { $IsAdmin = Gdn::Session()->CheckPermission('Garden.Users.Edit'); if(!$IsAdmin) return; $this->Permission('Garden.Settings.Manage'); $this->_AddCLEditor($Sender); }❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thank you I will try