mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Always use the identity name (not the alias) for enforcing the policies
This commit is contained in:
@@ -112,6 +112,9 @@ func (i *iam) Enforce(name, domain, rtype, resource, action string) bool {
|
||||
if identity.IsSuperuser() {
|
||||
superuser = true
|
||||
}
|
||||
|
||||
// Use the name (not the alias) from now on. policies are only associated with the name.
|
||||
name = identity.Name()
|
||||
}
|
||||
|
||||
l := i.logger.Debug().WithFields(log.Fields{
|
||||
|
Reference in New Issue
Block a user