How to add more custom permissions in nopCommerce?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
Hi there,
I'm using the nopCommerce 4.40.3. In Admin/Security/Permission there are lots of different permissions which can be assigned to couple of roles. I want to add more custom permissions myself. how should I change the code behind? Actually, I'm newbie to nopCommerce and not familiar with it completely.
1 year ago
Create a new Permssion

        PermissionRecord superviseSystem = new PermissionRecord
        {
            Name = "Admin area. System Supervisor",
            SystemName = "ManageSystemSupervisor",
            Category = "Your System"
        };
        await _permissionRecordRepository.InsertAsync(superviseSystem);

Check if the current user has access

                return await _permissionService.AuthorizeAsync(superviseSystem);
1 year ago
thank you very much.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.