question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modify Role - Granted permissions

See original GitHub issue

Hello

I downloaded the latest stable .net core project. And maybe its not a bug, but when i wanted to modify a Role, the permissions which were granted they were marked as granted. Then i modified the Role and some permission weren’t granted. But when i wanted modify second time these permissions were marked as granted.

I overrided the Get function like this:

public override async Task<RoleDto> Get(EntityDto<int> input)
        {
            var role = (from r in this.Repository.GetAllIncluding(n => n.Permissions)
                        where r.Id == input.Id
                        select r).FirstOrDefault();
            RoleDto roleDto = MapToEntityDto(role);
            List<string> grantedPermissions = role.Permissions.Where(m => m.IsGranted).Select(m => m.Name).ToList();
            roleDto.Permissions = grantedPermissions;
            return roleDto;
        }

Downloaded Abp version: 4.2.0 Upgraded to: 4.3.0 (Same issue) Thank you

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Gericho91commented, Mar 8, 2019

Hello

Yes, thank u, It was an old issue.

Thank you so much

On Fri, Mar 8, 2019 at 12:30 PM İsmail ÇAĞDAŞ notifications@github.com wrote:

@Gericho91 https://github.com/Gericho91 have you worked it out ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4334#issuecomment-470898165, or mute the thread https://github.com/notifications/unsubscribe-auth/AQesA_hsEkJze-QK0ELUr_lfmkC0-L9iks5vUknqgaJpZM4bcRNG .

0reactions
ismcagdascommented, Mar 8, 2019

@Gericho91 have you worked it out ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modifying a role - AWS Identity and Access Management
Generate a policy based on access information. You might sometimes grant permissions to an IAM entity (user or role) beyond what they require....
Read more >
Assigning permissions to roles (GRANT command)
Use the GRANT command to assign system and object permissions to roles. System permissions control the commands that can be run in the...
Read more >
Overriding a Role's permissions for an individual user ...
How to override a Role's permissions · Here you can view and edit the granted permissions. To remove the granted permissions completely click...
Read more >
Modifying a role trust policy (console) - AWS Documentation
Choose the name of the user or group to which you want to grant access, and then choose the Permissions tab. Do one...
Read more >
How To Use Roles and Manage Grant Permissions in ...
You can grant permissions using the GRANT command with this general syntax: GRANT permission_type ON table_name TO role_name ;
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found