mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 10:08:27 +01:00
Fix permission on delete token
This commit is contained in:
@@ -107,7 +107,8 @@ if (!getDolGlobalString($keyforparamsecret)) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'delete') {
|
||||
if ($action == 'delete' && (!empty($user->admin) || $user->id == GETPOSTINT('userid'))) {
|
||||
$storage->userid = GETPOSTINT('userid');
|
||||
$storage->clearToken('GitHub');
|
||||
|
||||
setEventMessages($langs->trans('TokenDeleted'), null, 'mesgs');
|
||||
|
||||
Reference in New Issue
Block a user