MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Asp.net Roles  (Mono Support )

Viewed 16096 time(s), 4 post(s) 9/22/2014 3:53:20 PMby Samtg
Samtg

Samtg

9/22/2014 3:53:21 PM
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.
This content has not been rated yet. 
440 Reputation 38 Total posts
khorvat

khorvat

9/24/2014 10:07:56 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
Samtg

Samtg

9/26/2014 5:43:50 AM
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.
This content has not been rated yet. 
440 Reputation 38 Total posts
khorvat

khorvat

9/26/2014 9:42:43 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts