How to make Localization be accessed by non Administrators example for CMSAdmin role

Vote:
 

Currently, in our solution, Localization can only be accessed if you belong to the Administrators group. How can we make it do the Localization be accessed by CMSAdmin role?

 

See Localization if you are an Administrator:

 

 

But do not see if you are CMSAdmin even though CMSAdmin have the access right of Administer:

 

 

#333740
Dec 02, 2024 22:05
Chris Sharp - Dec 03, 2024 15:31
Moved thread to the Add-Ons forum.
Which add-on is this? This is not an out-of-the-box Optimizely add-on.
Maybe it's DbLocalizationProvider?
Vote:
 

hey, if it's DbLocalizationProvider, then setting access rights for the AdminUI could be done via `AddDbLocalizationProviderAdminUI(c => ...)`. set `c.AccessPolicyOptions` to the desired restrictions.

#333798
Dec 03, 2024 16:30
Vote:
 

It is DbLocalizationProvider and when I do the following:

  services
    .AddDbLocalizationProviderAdminUI(options =>
    {
        options.UseAvailableLanguageListFromStorage = true;
        options.AccessPolicyOptions = (builder) => builder.AddRequirements(
            new RolesAuthorizationRequirement(new[] { Roles.Administrators, "CmsAdmins" }));
    })
    .AddOptimizelyAdminUI();

 

It grants CMSAdmin access to everything, even the settings and even the ability to set access rights and also other plugins. How do I restrict so that only CMS Admins can access the DbLocalizationProviderAdminUI ??

#334151
Dec 10, 2024 21:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.