Security :: How To Set A Role Of User Having Multiple Roles

Mar 5, 2010

This is my senario. I want user to login and if "LoggedIn" User has more than one role then it displays the list of radio buttons. After selection of the role user gets further privilages according to the role that he has selected.

I've a problem setting up the role. And user can change his role when ever he wants.

For Example "john" is the user having two roles "Account Manager" and "Project Manager".

View 3 Replies


Similar Messages:

Security :: Roles In FormsAuthentication / Specify The Role Of The Logged In User?

Mar 25, 2010

In my website i am creating a custom FormsAuthentication ticket during log in. This ticket stores the userid but i also need to specify the role of the logged in user. How do i do it?

View 2 Replies

Security :: User With Multiple Roles And Login Views?

Jul 21, 2010

I have users that belong to more than one role and I have a login view for those roles but I only see the first role's content.

How should I be going about getting to see all content for the roles that user is in? My user logs in and is a member of MACED and ADMIN but only sees the links for MACED

[Code]....

View 3 Replies

Security :: Add Multiple User And Roles At One Shot Using CreateUserWizard Control

Feb 17, 2010

I wanted to maintain the great features of ASP security control but i couldn't find a way to fit my purposes. I wanted to add in multiple user in one shot instead of one by one, So far using CreateUserWizard control only allow admin to add user once at a time. Is there a way to add in multiple user with a uploaded name list ?

View 3 Replies

Security :: How To Hide Multiple Roles With Roles.getallroles()

Mar 7, 2011

I have a multi level application that I am developing and need to block multiple rows from being joined. I know how to hide one role but I cannot figure out how to hide multiple.

Here is my current code

[Code]....

View 2 Replies

C# - Find All User That Are NOT In A Specifv Role Using: Roles.GetUsersInRole Or Different?

Jan 27, 2011

I need populate an array with a list of Users that ARE NOT PRESENT in a specific Role and COUNT the result.At the moment I use this code, but I am not able to get the Users outside "CMS-ADMINISTRATOR " role.Any idea how to do it and better write the Count section?

string[] usersInRole;
usersInRole = Roles.GetUsersInRole("CMS-ADMINISTRATOR");
int c = usersInRole.Count();

View 3 Replies

MVC :: Custom Membership / Role Provider Works But Seems Unable To Determine User Roles

Apr 26, 2010

I created a custom forms authentication and membership provider and it seems to work fine opening up in WAT, creating roles and adding users. Also when I in my mvc app use it to log users in, it works fine. However it seems to fail to determine a user's role (no errors, but just jump over User.IsInRole(...) lines and Roles.GetRolesForUser(); comes up empty. I got a gut feeling I did something wrong with my configuration, so for now I'll post just that:

[Code]....

View 6 Replies

Security :: Membership - Single User For Multiple Application And Different Role In Each Application

Jan 30, 2010

I have two .NET applications X and Y

a. I want to have User A as a common user for both application X and Y.
b. User A can have different roles on X and Y. Eg. Read permission on Y and Write Permission on Y.

How do i configure ASP.NET membership to achieve about functionality.

View 3 Replies

Security :: Multiple Roles For Multiple Page Access?

Jan 20, 2011

I'm planning to make a page that has about 10 different pages for varying use, for example, stats, data entry, reports, logistics, audit, sales, promo, etc etc. I'm anticipating there will be many combinations as to what pages a user may have access to, for each page, a user ought to be authorized to either enter new data, edit data, print and/or just view.

My questions are :

1. can membership & roles be used, once user is logged in, to display links to all the areas of the web app he is allowed access to?

[code]....

2. besides having access to a particular page, a user should, as mentioned before, be authorized to either enter new, edit, print and/or just view data.
3. Is there a preferred/better method to handle this besides using membership & roles?

View 3 Replies

Security :: Enable User To Edit / Delete Based On User's Role Permission

Feb 24, 2011

I'm trying to allow logged user who are in department XYZ to perform some task for my third party App. I have two SQL tables named Users & UserList. The third party app (GoldMine) graps the USERNAME from the Users table and store it as UserID which I then referecnce SessionID. The UserList table has two columns (GM_UserName & Department) which I'm interested in. When a user login into the 3rd party app (GoldMine), i then compare the USERNAME (from Users table) to GM_UserName (from UserList table) and see whether GM_UserName is in = 'Dept XYZ'. Take a look at the SQL query below.

sqlDept = "SELECT USERNAME FROM Users LEFT JOIN UserList ON UserList.GM_UserName=Users.UserName WHERE UserList.Department ='Dept XYZ'"

I'm able to do this.

If Session("Userid") = "TestUser1" Or Session("UserID") = "TestUser2" Then Do this Else Do that End If
BUT unable to do this...
If user's Department = 'Department XYZ' Then
Do This
Else
Do that
End IF

View 2 Replies

Security :: Multiple Applications Use Same Users & Roles?

Jan 10, 2011

I am using ASP.NET Membership with the default provider. I have a project where there are 3 different applications(seperated by the applicationName). Now I need every user to be able to log in to all the applications, but have a seperate role in each.Is this possible(I dont want to duplicate user details or logins for the same person)?

View 4 Replies

Security :: Allowing Access To Users Who Are In Multiple Roles?

Feb 26, 2010

I have a web.config file with <authorization> section. I'm using window authentication.

The problem is that I would like to allow access to the web site to those users who are in multiple roles.

For example:

<authorization>
<allow roles = "Role1 AND Role2"/>
<deny users="*"/>
</authorization>

(Meaning I would like to allow access only to those user who are both in Role1 AND Role2.)

Is this possible to achive this?

If not, what would be the alternatives?

Note: Currently I'm doing the roles assignment in the Global.asax file in the OnAuthenticateRequest event (i'm reading the groups that the current user belong to in the Active Directory).

View 4 Replies

Security :: How To Add Multiple .Net Membership Roles For A Single Page

Mar 26, 2010

I have developed an asp.net website. I Have Used Asp.Net membership provider.My Question is , I Have Three Roles , For Eg: Basic, Intermediate, Admin ...Now , i need to apply two roles for single page say basic and admin .... How can i do this ... Plz help me .... Thanx in advance ......

if (Roles.IsUserInRole("Admin") == false)
Server.Transfer("AccessDenied.aspx");

View 6 Replies

Security :: How To Get The User's Role

Jan 22, 2011

Is there any way that I can find the exact name of the role a User is in? There is a property for UserName ( User.Identity.Name) but what about the role?

View 1 Replies

Security :: How To Assign Two Roles For One User

Jan 11, 2010

Im now in assigning a roles to a user. But, 1 of my user wants me to assign 2 roles for him.. The situasion is like this :

I have a few roles which are :

- zone head

-zone officer

-clerk

The problem is now 1 person can be assign for 1 role only..

How can i assign 2 roles for 1 user..

View 4 Replies

Security :: Adding User To Certain Roles?

Aug 24, 2010

I have setup ASP security in my application. I used the following tutorial, just wondering if someone can tell me how i can setup this up to allow the creation of a user?

http://weblogs.asp.net/scottgu/pages/Recipe_3A00_-Implementing-Role_2D00_Based-Security-with-ASP.NET-2.0-using-Windows-Authentication-and-SQL-Server.aspx

where to find or what to search on to find some example of how to add the option for adding users?

I have the above setup and its working, but only because of the accounts i created with my global.asax file.

I need to give the admins access to add a new user. Currently i can search on existing users and update them, but need to add the ability to add a new user.

View 4 Replies

Security :: Showing An User's Roles?

May 8, 2010

I'm trying to show a user's roles in a label but here's what I get when I view the page in the browser:

[IMG]http://i887.photobucket.com/albums/ac76/scoobymadterry/teamadminpage.jpg[/IMG]

As you can see instead of the roles, System.String[] shows in the label. How can I get the roles instead of that?

View 4 Replies

Security :: Multiple Role Membership / How To Populate A Dropdown List With Users

Oct 13, 2010

I need to populate a dropdown list with users who match certain role criteria. For example, if I have the following roles: Manager, Employee, Supervisor I would like to populate the list with only the Manager and Employee roles. Some individuals have multiple roles and they should be excluded if they also have the Supervisor role as illustrated below:

Name: A , Role(s): Manager, Employee, Supervisor

Name: B, Role(s): Employee

Name: C, Role(s): Manager, Employee

The final list should only contain names B & C.

I can use Roles.GetUsersInRole("Employee") but I am not sure if this is efficient or not.

View 2 Replies

Security :: How To Add Role To New User Upon Creation

Dec 10, 2010

I have a page setup to manage and create users.. in order to help the process of creation, i woudl like to add the new users to our default "users" role when they click the create button. Below is what is in place for the creation page and the button event tied to the button. I used this from a tutorial i found else where, but dont have the link at the moment if anyone needed it.. but the code below works great when creating a new user

[Code]....

View 5 Replies

Security :: Can't Save Role Of User

Feb 12, 2011

The roles of users are not saved. Here is what i am doing:

[Code]....

And i added this to the create user wizard:

<asp:WizardStep ID="SpecifyRolesStep" runat="server" StepType="Step"
Title="Specify Roles" AllowReturn="False">
<asp:CheckBoxList ID="RoleList" runat="server">
</asp:CheckBoxList>
</asp:WizardStep>

View 1 Replies

Security :: Get The Role Of The User Using Memebership

Dec 31, 2010

I need to get the role of the user using memebership.

View 2 Replies

Security :: Checking User For Particular Role?

Jan 28, 2011

im using forms authentication and created roles.

while the user enters the credentials im authenticating the user with username and password

now i also want to check the particular user whether he is that role.

eg:

if username,password are true and role is Admin i redirect him to Adminhome.aspx

else to empHome.aspx.

im able to chek username and password but im unable to detect the role.

[Code]....

View 6 Replies

Security :: How To Direct User When Login By Roles

Jan 27, 2011

How to Direct Users to specific Page By roles?

View 10 Replies

Security :: Adding Domain User Roles To A Web App?

Jun 18, 2010

I want to make my domain administrators the administrators to my web application so that they are the only ones that can change content. All other users would simply be able to read the material. I am relatively new to web apps and I can not seem to find what I am looking for anywhere on the net.

View 2 Replies

Security :: Use Or Store Roles For Add A New User Or Update?

Jul 2, 2010

Ive been exploring the tabls in the membership database to see how they are structured. If i add a new user or update an existing one i see it in the user and membership tables. But i dont understand how to use or store roles. I use the ASP.NET CONFIGURATION toll in the WEBSITE menu to create roles and create access rules, but those roles dont show up in the Roles table in the db!

Yet the roles are stored cause they keep apearing in the ASP.NET CONFIGURATION. How weird is not that? Where is it stored and how can i access it? I need to programatically check if the user who is logged in is in a certain role.

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved