Hi,
After seeing
https://idempiere.atlassian.net/browse/IDEMPIERE-5210 and how you identify an administrator role (
role.getName().toLowerCase().contains("admin")) via
https://github.com/bxservice/de.bayen.freibier/blob/f6df98ecdb7e02629ee65020d57aa5476ab87f55/de.bayen.freibier/src/de/bayen/freibier/model/FreiBierEventHandler.java#L27, I think it would be useful to have a "real" way to identify an administrator (at tenant level).
ATM the moment, a tenant administrator role is just a role (but I cannot identify using the name as it will be 'amministratore' in Italian, and there is no 'admin' in it).
Moreover, I don't want those role to have the AccessAdvanced = Y - is just for us (at TGI).
Here's my current requirement (but I think that could apply to several situations): be able to identify a role which is an administrator.
We have a table which stores credentials for an extranet.
I added a process to show passwords (idea is that everyone can see its own password and Advanced/Support can see all passwords).
But I would like tenants to be autonomous, so tenant administrators can see all passwords too.
Current logic is
@AD_User_ID@ = @#AD_User_ID@ | @#ShowAdvanced@ = Y | @#AD_Role_Type@ = SSNew logic would be :
@AD_User_ID@ = @#AD_User_ID@ | @#ShowAdvanced@ = Y | @#AD_Role_Type@ = SS | @#IsClientAdministrator@ = Ynb: ATM, there is a MUser.isAdministrator() method which returs true if the user has access to System role.
wdyt?
Thanks,
Nicolas