to prevent non-admins from getting to the link if they know it, change ....
public function ProfileController_Signature_Create($Sender) {
if (!C('Plugins.Signatures.Enabled'))
return;
to
public function ProfileController_Signature_Create($Sender) {
if (!C('Plugins.Signatures.Enabled'))
return;
//add these three lines here below
$IsAdmin = Gdn::Session()->CheckPermission('Garden.Users.Edit');
if (!$IsAdmin)
return;
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Comments
With this change only Admins (or roles that can edit users) can make a signature or edit a signature for a user.
to prevent option from showing to non-admins
change line 64
to
to prevent non-admins from getting to the link if they know it, change ....
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@so chanux, did this ever work for you?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
if I may hijack for a moment, what file is that you are editing here? Is there one master file where all the good stuff is?
look in the signatures plugin.
generally if someone posts a change to a plugin
it is code in the plugin folder
generally default.php (if there is one)
or class.FILLINTHENAMEOFTHEPLUGIN,plugin.php
since there are generallt very few php files in a plugin.
you can always get notepad++ or some other editor and search for line references.
so you could always search all the php files in the signature plugin for "ProfileController_Signature_Create" and that would tell you the file.
in this case it would be class.signatures,plugin.php
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Ok thanks peregrine, really big help. I need to look at the back end files more carefully.
@qh3
thanks for responding back. let us know if it works for you.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.