Merge pull request #6617 from battye/ticket/17109

[ticket/17109] Don't show the attach signature option if the user doesn't have permission
This commit is contained in:
Marc Alexander 2024-05-23 21:34:26 +02:00
commit 477f5d9e1d
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
3 changed files with 5 additions and 1 deletions

View file

@ -488,6 +488,8 @@ class ucp_prefs
}
$template->assign_vars(array(
'S_SIG_ALLOWED' => $config['allow_sig'] && $auth->acl_get('u_sig'),
'S_BBCODE' => $data['bbcode'],
'S_SMILIES' => $data['smilies'],
'S_SIG' => $data['sig'],

View file

@ -1966,7 +1966,7 @@ $page_data = array(
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
'S_SMILIES_ALLOWED' => $smilies_status,
'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
'S_SIG_ALLOWED' => ($auth->acl_get('f_sigs', $forum_id) && $config['allow_sig'] && $user->data['is_registered']) ? true : false,
'S_SIG_ALLOWED' => ($user->data['is_registered'] && $config['allow_sig'] && $auth->acl_get('f_sigs', $forum_id) && $auth->acl_get('u_sig')) ? true : false,
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
'S_NOTIFY_ALLOWED' => (!$user->data['is_registered'] || ($mode == 'edit' && $user->data['user_id'] != $post_data['poster_id']) || !$config['allow_topic_notify'] || !$config['email_enable']) ? false : true,
'S_NOTIFY_CHECKED' => ($notify_checked) ? ' checked="checked"' : '',

View file

@ -23,6 +23,7 @@
<label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
{% if S_SIG_ALLOWED %}
<dl>
<dt><label for="sig1">{L_DEFAULT_ADD_SIG}{L_COLON}</label></dt>
<dd>
@ -30,6 +31,7 @@
<label for="sig0"><input type="radio" name="sig" id="sig0" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
{% endif %}
<dl>
<dt><label for="notify1">{L_DEFAULT_NOTIFY}{L_COLON}</label></dt>
<dd>