Questions tagged [role-based]

58 questions
2
votes
2 answers

Role-based authorization not working in ASP.NET Core 3.1

[Authorize(Roles = "Admin")] is not working for me. In startup.cs (ConfigureServices) I have: services.AddDbContextPool( options => options.UseSqlServer(Configuration.GetConnectionString("defaultCon"))); …
2
votes
3 answers

jenkins Role-Based Strategy - project role patterns

I am trying to provide a Role-Based Strategy project role patterns: Role to Add: sysadmin Pattern: *-stack While saving those changes, I am getting following error in Jenkins Stack…
Prash
  • 71
  • 3
  • 11
2
votes
2 answers

Access Control Lists or Role-based access control in yii

hy i wanna understand what it the best methode to use and how if there is a simple exemple because i can't specify whitch rol to give to witch personne public function accessRules() { return array( array('allow', // allow authenticated…
2
votes
1 answer

MVC 5 Role Based Authentication

I am trying to lock down our "admin" page to only admins using Asp.net Identity (we are building in MVC5). I can get [Authorize(Users="admin")] to work but can not get [Authorize(Roles="Admin")] to work. I have created the role in the…
2
votes
2 answers

Roles/Priviledges in a Spring/Hibernate application

In a banking or similar application there are usually several roles defined and associated privileges required (for example a normal user could only do transactions but not post it while a supervisor can verify and post them, sort of maker/checker).…
Dchucks
  • 1,189
  • 5
  • 22
  • 48
2
votes
9 answers

Anthropomorphising interfaces - good or bad idea?

I have for some time tried to anthropomorphise (meaning human readable) the names I give to interfaces, to me this is the same as give an interface a role based name – trying to capture the purpose of the interface in the name. I was having a…
AwkwardCoder
  • 24,893
  • 27
  • 82
  • 152
1
vote
2 answers

Role based security in ASP.NET

In my ASP.NET 3.5 application, on the ASPX pages I have to implement role based data update policy. If a user have lest privilege, he can still update some filed but not all. Where user with maximum privilege can update all filed on page. I was…
iPhoneDev
  • 2,995
  • 4
  • 33
  • 44
1
vote
1 answer

Azure AD Authorize Role throws 403 Forbidden Error .Net Core 3.1 WebApi

I tried the Role based Authorization in my .Net core 3.1 webapi using Azure AD. The issue is happening only when I specify Policy or Role in the Authorize attribute: [Authorize(Policy = "p-web-api-with-roles-user")] [Authorize(Roles="User")] My…
1
vote
1 answer

how to implement different roles in an angular application with JWT

I am trying to build an application with an express backend with jwt and with angular as frontend. The problem is that I need to identify the users who log in to the application to redirect them to their respective panel. The type of user of each…
Mat
  • 33
  • 1
  • 7
1
vote
0 answers

Two different models in django rest framework

Iam new to django rest framework. I have created two registration models - user model and doctor model. Now trying to create lopin API. How to achieve two different models under 1 API. Please suggest me in validating login credentials of user and…
1
vote
0 answers

Is it correct to use the ASP.NET Role-Based Security in a standalone WPF application?

I have a little experience to use the ASP.NET Role-Base in the WinForm apps. I know how should I use it in such applications. Now we would like to use it in a business WPF application. Is it OK? I know it's possible but is it right to do…
Amir Karimi
  • 5,401
  • 4
  • 32
  • 51
1
vote
1 answer

sec:authorize="hasRole('ROLE_ADMIN')" in angular

I am implementing Role based spring security In this example they have used thymeleaf for frontend purpose, but I am using angular9 with html. they are using sec:authorize="hasRole('ROLE_ADMIN')" to provide access to the admin,in the same way if I…
Gen
  • 2,400
  • 4
  • 24
  • 46
1
vote
4 answers

Is ASP.NET role based security a true role based access control system?

From what i have read from this paper I understand that a role based access control system is one where users can be assigned to roles where roles specify permissions to perform operations on objects But in asp.net we do not specify "Operations on…
taher chhabrawala
  • 4,110
  • 4
  • 35
  • 51
1
vote
1 answer

Execute multiple queries then union them with LINQ?

I'm trying to build a drop down list that holds available options (i.e. a page category that a user can create a page for) for the logged in user, however, these are based on user roles due to the nature of how our business works - of which a user…
LiamGu
  • 5,317
  • 12
  • 49
  • 68
1
vote
1 answer

role based access with foreign key value

I'm a bit new to php and database. I've developed a role based access web application. The scenario is that i have a 2 tables tbl_user columns -> user_id, username, school_id (school_id is foreign key) tbl_school columns -> school_id,…
Malik
  • 103
  • 6