Mono Support Asp.net Roles 

Viewed 17669 time(s), 4 post(s), 9/22/2014 3:53:20 PM - by Samtg
9/22/2014 3:53:21 PM
440 Reputation 38 Total posts

Hi,
     I was wanting to change the role of a friend, more specifically the privacy levels, and was wondering from this one article (http://www.mono-software.com/Blog/post/Mono/38/Support-for-ASP-NET-profiles-in-MonoX/), how would you implement this code, or an example of it:
UserProfileRepository.GetInstance().PrivacyLevelPrivate.Id

Also, could you use that for a link or button to indicate privacy?
Last, can you make a friend a role (so that only friends can access certain pages, and not others)?


Thanks.

1
9/24/2014 10:07:56 AM
15993 Reputation 2214 Total posts

Hi,

yes you can create the Friend role and use that role for page access permissions. I'm not so sure about your question related to privacy levels and roles as they are not connected in any way other than by business rules to compile relationship filters. If you were talking about the privacy level - Friends, you can't set the privacy level on user but you need to set the privacy level on e.g. user profile field and only then this field is exposed to your friends.

Please elaborate your question a bit more so we can provide you with better answer.

Regards

2
9/26/2014 5:43:50 AM
440 Reputation 38 Total posts

I suppose, more specifically, say you were to let your friends have access to only certain parts of your profile, how would you programatically make that role?  (example publishers, administrators, have certain access, "friend" access role)

Thanks.

3
9/26/2014 9:42:43 AM
15993 Reputation 2214 Total posts

You can add access control functionality on that pages, and access control should check (early in the page life cycle) if user accessing the page is friend of that profile owner user, if so allow access if not reject the access. It's not a good practice to create a friend role as users can friend or unfriend at any time.

You have MonoX BLLs that can be used to check if user is friend with some other user and that can be used for ACL.

Regards

4
This is a demo site for MonoX. Please visit Mono Software for more info.