Skip to content

Commit

Permalink
Fixed issue: Original superadmin (UID 1) should always be able to edi…
Browse files Browse the repository at this point in the history
…t other users passwords
  • Loading branch information
c-schmitz committed Apr 10, 2020
1 parent 61738e9 commit 7e7b495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/views/admin/user/modifyuser.php
Expand Up @@ -47,7 +47,7 @@
</div>
</div>

<?php if( !Permission::model()->hasGlobalPermission('superadmin','read', $oUser->uid) ): ?>
<?php if( !Permission::model()->hasGlobalPermission('superadmin','read', $oUser->uid) || (Permission::model()->hasGlobalPermission('superadmin','read', $oUser->uid) && Yii::app()->session['loginID']==1)): ?>
<div class="form-group">
<label for="password" class=" control-label">
<?php eT("Password");?>
Expand Down

3 comments on commit 7e7b495

@Shnoulle
Copy link
Collaborator

@Shnoulle Shnoulle commented on 7e7b495 Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No , usage of forced super admin

public static function isForcedSuperAdmin($iUserID)

I can fix and push if needed :)

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<?php if( !Permission::model()->hasGlobalPermission('superadmin','read', $oUser->uid) || (Permission::isForcedSuperAdmin(Permission::getUserId())): ?>

with

public static function getUserId($iUserID = null)

:)

@c-schmitz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thank you!

Please sign in to comment.