Faking User Roles In Sitecore 6.2?
Jun 17, 2010
The Faking User Roles document in SDN appears to give exactly what I need. I have a few "roles" that I have access to through stored procedure calls I don't control, read-only, via a CRM I don't have direct access to.
Unfortunately, I can't find the method AddRole, or even the class UserItem, by its present name. Does this functionality exist in Sitecore 6.2? If so, where is it?
View 4 Replies
Similar Messages:
Feb 24, 2011
Let's say I have a rolegroup as follows:
<asp:LoginView ID="lvDoSomeStuff" runat="server">
<RoleGroups>
<asp:RoleGroup Roles="RoleOne,RoleTwo">
<ContentTemplate>
...
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
Is there a way I can make it so that a user must meet RoleOne and RoleTwo to satisfy the RoleGroup? By default, if a user is in either of the two roles, they will be granted access. I know I can do this via the code-behind, but I'd prefer to be able to wrap some content template with this markup instead of having to wrap it in a panel and hide the panel programmatically.
View 1 Replies
Feb 26, 2014
i need a script on ASP.net that can build this form.
1.Users === Drop Down Menu then in the Drop down should be the names of all Taafoo staff.
View 1 Replies
May 7, 2015
In Below link show to how to Imaplement role based security, Page access and show / Hide Menu items based on Role in asp.net
[URL]
But My Questions is How to Register Admin and Client user?
View 1 Replies
Apr 3, 2010
I'm developing a web application I want to use the role authentication to control different parts of the website accessibility. But my problem is say I implemented a upload and download functionality on one of the page and I want to have the ability to control a user whether they can either upload or download; or both. So, I'm not exactly sure if the role base authentication can support a user with more than one role to work the way I want it.
View 1 Replies
Aug 11, 2010
I am baffled, I am using a treeview to set the source of an iframe. The web page is being displayed correctly, but User.IsInRole("roleName"), in the code behind, always returns false. The strange thing is User.Identity.Name returns the correct user name. I have tried setting the target of the tree view nodes to "_blank" and to "_self" and still no luck. So, it doesn't appear that the problem is related to the iframe.Before the treeview was added, javascript was used to set the source for the iframe and User.IsInRole returned the correct values.
View 4 Replies
Sep 6, 2010
I am not sure is there any other way to add User for my application othe than using Asp.net Website admistration tool??
View 1 Replies
May 7, 2015
What if, I'm not using the LOGIN CONTROL but rather creating a Custom Control for Login. Is it possible to have user roles and a site map that redirects to its own destination when the user login?
View 1 Replies
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
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
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
Jan 27, 2011
How to Direct Users to specific Page By roles?
View 10 Replies
Jul 26, 2010
i am using asp.net built-in membership and role provider.
In my application Admin Create account for user.
currently i am assigning roles by going to asp.net configuration website.
kindly tell me how to add an extra step of Select Role in creat user account API.
View 2 Replies
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
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
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
Feb 25, 2011
I am busy writing my own custom attribute for my action method called MyAuthorizeAttribute, I am still busy writing the code, here is my partial code:
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class MyAuthorizeAttribute : AuthorizeAttribute
{
public new Role Roles;
public override void OnAuthorization(AuthorizationContext filterContext)
{
base.OnAuthorization(filterContext);
if (Roles != 0) // Did it this way to see what the value of Roles was
return;
// Here I am going to get a list of user roles
// I'm doing my own database calls
filterContext.Result = new HttpUnauthorizedResult();
}
}
Here is my Role enum:
public enum Role
{
Administrator = 1,
SuperAdministrator = 2
}
My action method:
[MyAuthorize(Roles = Role.Administrator|Role.SuperAdministrator)]
public ActionResult Create()
{
return View();
}
The reason why I did not use Roles = "Administrator,SuperAdministrator" was because the roles are hard-coded. I don't want to have a 100 places to change if the role name changes.
Given my method, when it gets to if (Roles != 0) then Roles total value is 3, how would I check to see if these 2 roles is in the list of user roles for a specific user?
Am I doing it correct here? If not how would I otherwise implement this? It doesn't have to be the way that I did it in.
View 2 Replies
Jul 8, 2010
In a standard, generated list view, how can I hide certain ActionLinks based on the roles the logged in user belongs to?
View 1 Replies
Dec 31, 2010
I'm trying to add a step into a Create User Wizard to set roles, but it don't works, it create the user but don't set the role,
[Code]....
using System;
View 1 Replies
Mar 20, 2010
have a project where there are main 3 types of users i have to block them from accessing other pages but without using roles or membership is there any other way to do the same?
View 3 Replies
Sep 7, 2010
I have used asp.net membership and roles in my application. Its working fine.
I have an (.aspx page) where i have placed create user wizard, to create new user dynamically.
The same way i have created roles in my application.
What my requirement is, how to set roles dynamically to a particular user from my (aspx page).
View 2 Replies
Feb 23, 2011
I am using ASP.NET MVC 3. We assign roles to certain people at work, then we use Windows authentication to determine what roles a user has. Lets say the roles are RoleA, RoleB and RoleC. So now I get a list of roles for a user. Lets says that UserA belongs to RoleA and RoleB. Some of my views need to be authenticated as not everyone can view certain views. Lets say that ViewA can only be viewed by users that belong to roles RoleA and RoleB. How would I do this? What would I need to look into? When a user that does not belong to these roles tries to access the views then he/she should be redirected to an error page.
View 1 Replies
May 7, 2010
Its very easy to add users to roles by using the in built controls. but how can add users through customized login controls?. i have tried using
//MembershipUser m = Membership.CreateUser(name, pass, null);
View 3 Replies
Mar 18, 2010
I have Use Repeater for my sitre nevigation with sitemap daya source
[Code]....
but my site has 3 user type employee clientadmin and globle admin so employee runs on separate section (SitemapProvider) but clientadmin and globle admin user same SitemapProvider so i need to set two pages visible false for client admin when some one logged in as a client admin how can i do it please give the way with code snippet please thank you for attention
View 7 Replies
Nov 15, 2010
In my project I have one folder called Administration (contains pages created for administrating the public part of the page) and in root I have public pages. What I want to do is to prevent anyone beside administrator to enter the Administration part and to make the Administration/Login.aspx default page for entering Administration part. This part makes me confused. I tried to create the access rules, but that wasn't the option because I upload the images to the Administration/Upload folder so if I deny the users the images on the public part can't be accessed.
The second problem I don't know how to solve is public part of the page where I want to allow commenting only to logged in users (users only, not the admin). How to check if user is logged in and authetificated and how to enable the commenting part of the form to him (textbox and submit button).
View 6 Replies