Posted By Michael Tobisch on 10/8/2024 4:08 PM Posted By Sebastian Leupold on 10/8/2024 12:25 PM Posted By Michael Tobisch on 10/8/2024 11:45 AM There are many extension out there that rely on something like <code>RoleController.GetRoleByName(0, "Administrators");</code> Although this is the wrong method to retrieve system Roles like Administrators and Registered Users role, it might be best to add a "LocalizedRoleName" property. Sorry, but what's wrong with it? Happy DNNing! Michael
Posted By Sebastian Leupold on 10/8/2024 12:25 PM Posted By Michael Tobisch on 10/8/2024 11:45 AM There are many extension out there that rely on something like <code>RoleController.GetRoleByName(0, "Administrators");</code> Although this is the wrong method to retrieve system Roles like Administrators and Registered Users role, it might be best to add a "LocalizedRoleName" property.
Posted By Michael Tobisch on 10/8/2024 11:45 AM There are many extension out there that rely on something like <code>RoleController.GetRoleByName(0, "Administrators");</code>
<code>RoleController.GetRoleByName(0, "Administrators");</code>
Although this is the wrong method to retrieve system Roles like Administrators and Registered Users role, it might be best to add a "LocalizedRoleName" property.
Sorry, but what's wrong with it?
Happy DNNing! Michael
PortalSettings.AdministratorRoleName (but there might be a newer one..)
Posted By Daniel Valadas on 10/8/2024 6:04 PM Peter can correct me if I am wrong, but the role would still be "Administrators" for any code, it would just have localized values for the UI only.
That's also what I thought based om my conversation with Peter before
FYI, I tested a build containing Peters PR and this is the result:
<code>DotNetNuke.Security.PortalSecurity.IsInRoles("All Users") > True</code>
<code>DotNetNuke.Security.PortalSecurity.IsInRoles("Everyone") > False</code>
Although you do see "Everyone" in the Page / Module permissions. So it's only a localized text for the end user
FYI, Big Shout-out to Peter Donker who implemented this for DNN 10
See: https://github.com/dnnsof...n.Platform/pull/6133
Posted By Timo Breumelhof (40F) on 10/22/2024 2:13 AM FYI, Big Shout-out to Peter Donker who implemented this for DNN 10 See: https://github.com/dnnsof...n.Platform/pull/6133
Thank you Peter!
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.