Questions tagged [role]

396 questions
4
votes
5 answers

How do I access JAAS roles at arbitrary point in the code?

I want to access the full model of users with their roles in my SOAP app. For example, I might want to know the role of a user called "Fred." How do I reach into some sort of global JAAS registry and do (pseudocode) …
Joshua Fox
  • 18,704
  • 23
  • 87
  • 147
4
votes
1 answer

How to create a role to ServiceAccount with context

I want to create a role to service account with context. My goal is to be able to run kubectl get pods with the context of the service account. To do it I need: Create service account Create role Create bind role Create context I created a…
E235
  • 11,560
  • 24
  • 91
  • 141
4
votes
2 answers

Ansible: Variables defined under defaults are not loaded in to my playbook

I have defined a role dcn-rq2 and it has some variables defined in ~/dcn-rq2/defaults/main.yml file and i have written a playbook which includes this role at the top as shown below. my understanding is that all the vraiables defined in the role…
user3802947
  • 63
  • 2
  • 7
4
votes
3 answers

UserManager.AddToRole not working - Foreign Key error

In my ASP.NET MVC application I have some code which should be fairly trivial: UserManager.AddToRole(user.id, "Admin"); I just get this error... The INSERT statement conflicted with the FOREIGN KEY constraint …
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
4
votes
2 answers

Spring security jdbcAuthentication does not work with default roles processing

Using @Autowired public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication().withUser("dba").password("root123").roles("ADMIN","DBA"); my example works fine. For example…
Sergii
  • 7,044
  • 14
  • 58
  • 116
4
votes
2 answers

Google storage write only (no delete)

I would like to use google storage for backing up my database. However, for security reason, i would like to use a "service account" with a write only role. But it seems like this role can also delete objects! So my question here: can we make a…
Olivier
  • 834
  • 2
  • 7
  • 12
4
votes
2 answers

assign role to user at account creation asp.net

I'm still a student and I'm learning C#. I have to make a little application in ASP.NET. The application has to use roles. So, I "linked" a MemberShip to my database (with the tool asp_regsql). Now I have all the asp tables so it's ok. I created 2…
Hito
  • 697
  • 1
  • 8
  • 23
4
votes
2 answers

Restrict access to images in Rails app

I have rails project. In my project I load images on server (rails 3 + paperclip + devise + cancan). I want to limit access to files (for example, the original image can be viewed only by the administrator). How should I do it?
user1466717
  • 779
  • 1
  • 10
  • 23
4
votes
2 answers

Role Based Access Control DB Design

This question isn't about the database design of the RBAC system itself, but rather how to use this database in conjunction with the application specific database when that web application allows its users to submit content. As it stands my RBAC…
Etzeitet
  • 1,995
  • 2
  • 18
  • 22
4
votes
1 answer

How to activate Azure CDN for cloud service web role

I have created a CDN endpoint at [id].vo.msecnd.net, and I have deployed a production mvc4 cloud service web role. It has images in a root-level /cdn folder, but I cannot get those images to load via cdn. I can access them via direct URL. For…
3
votes
1 answer

SYMFONY2 : ACL, Role and ClassScope

I have a problem with the ACLs : I use a class scope to grant permissions on Role. This is my code to declare the ClassAce : $objectIdentity = new \Symfony\Component\Security\Acl\Domain\ObjectIdentity('class', 'Complete\\Class\\Name'); try { $acl…
loicfavory
  • 837
  • 6
  • 14
3
votes
1 answer

Is the role attribute supported by search engines?

HTML5 introduced 22 new markup tags. W3C still recommends we stick to the old tags, because IE exists. I think adding JavaScript for this purpose is over the top. HTML5 also features the less known role, comparable with the ARIA role of XHTML 2. The…
bopjesvla
  • 755
  • 4
  • 15
  • 22
3
votes
3 answers

Ruby on rails, cancan and default role assignment

I have built a small ruby webservice, in this I have implemented cancan authorization. I followed this tutorial. The problem is that, I can't find out the way to assign at the user, when they do the registration to my site, the base role level. I…
Marco Fedele
  • 2,090
  • 2
  • 25
  • 45
3
votes
0 answers

WooCommerce: filter orders by role

how can I filter orders by role? I need to filter them by its own author (shop managers). I have this url hook, which displays orders based on the shop manager who added them (in this example user id number…
Ste Yeu
  • 157
  • 1
  • 8
3
votes
1 answer

Spring Security: method to check if a user has a Hierarchical Role

how i can check if a user has a hierarchical role at runtime ? I know this solution for the url authorization @PreAuthorize("hasRole('ROLE_ADMIN')") but inside a method if i have to check the role ? For example: ROLE_ADMIN > ROLE_USER >…
Alberto Costa
  • 127
  • 1
  • 6