each user can edit his/her content only

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
10/17/2010 3:59:57 AM
Gravatar
Total Posts 5

each user can edit his/her content only

Hello Everyone ....

i am developing a Website (networking) wich allow each user to add his/her content, specially for Calendar Event and Blog features, i wonder is there a way that just each user can only admin his content instance, i.e.  if another user login he can only add another content ... but can not delete or edit others content ......... please it so important ..... and if it is not .. how can i modify this security .. which class ... i tried  a lot to find out but with out success .....

Thank you for your support

10/17/2010 4:30:47 AM
Gravatar
Total Posts 550

Re: each user can edit his/her content only

Hi,

That kind of work that you say is a social networking that I think mojoPortal not design for that. In mojoPortal almost all features have role based security at feature instance  level NOT at feature item level(in multi item features like blog ,Event Calendar).

Hope Helps,

Asad

10/17/2010 6:19:55 AM
Gravatar
Total Posts 5

Re: each user can edit his/her content only

Dear Asad

Thank you for your reply ... i am sure mojoportal in not social networking software .....

so what i understand now .... the whole members of the role have permission over the module ... can edit all instances

Ok, let me ask from another view ..... how can i hide the edit or delete icon for the instance ... if the "logged in user" is not the author or the Admin .... where can i edit such code in the module  that makes me allow this .... ... i ll be happy if you show me 

 

Thank you again in advance 

Salam

 

10/17/2010 6:36:07 AM
Gravatar
Total Posts 550

Re: each user can edit his/her content only

Hi,

First of all, I recommend you to post your questions in mojoPortal Persian Community if you are Iranian.

Any features have own security policy. Please let me know what feature is your mean?

Best,

Asad

10/17/2010 7:07:51 AM
Gravatar
Total Posts 5

Re: each user can edit his/her content only

Dear Asad

Thank you for your support ....

i wished to be Persian ... but i am not :) 

i am Egyptian .. and we have the same concern of Right To Left layout and Arabic support ... which you really could help me and we could exchange ideas 

 

the features i am talking about are Blog and EventCalendar

 

i ll be happy if i have your support 

 

Salam Alikum

10/17/2010 7:38:56 AM
Gravatar
Total Posts 550

Re: each user can edit his/her content only

Hi ,

Sorry at this point these features not have what you want.

Best,

Asad

10/17/2010 7:43:08 AM
Gravatar
Total Posts 5

Re: each user can edit his/her content only

Dear Asad

thank you again ... i know this featurtes do not have ,,,,, i would llike to modify the code to achieve such issue ... as it is in the Forum feature ... can you just tell me what files i could modify .....

 

Best Regards 

10/17/2010 7:50:51 AM
Gravatar
Total Posts 550

Re: each user can edit his/her content only

Hi,

I recommend don't any changes in existing code because you can't update your local copy from repository without lost your changes. You can clone existing feature as new feature and extend it as you want. please see cloning an existing feature documentation.

Best,

Hope Helps

Asad

10/17/2010 9:29:18 AM
Gravatar
Total Posts 5

Re: each user can edit his/her content only

Dear Asad

Ok, I understand what u mean ..... but .. as i am new to develop to mojoportal

the scenarios that i am looking to is : 

  1. indicate (code files) where can i hide the edit button (ed)
  2. how to get the current user login to the site  (api class, method)
  3. how to get the user created the entity  (api class, method)
  4. so, i can compare both users to show/hide edit icon

best regards 

10/17/2010 10:16:30 AM
Gravatar
Total Posts 550

Re: each user can edit his/her content only

Hi ,

This items are easy to done , but what you MUST care about it is dangerous scripts that may be injects by unknown users in editors. mojoportal suppose site owners  known own users. Even you can do what is in your mind as follow:

  1. indicate (code files) where can i hide the edit button (ed)

You can set visible property of button to a method that check user access and return a boolean value.

  1. how to get the current user login to the site  (api class, method)

 SiteUtils.GetCurrentSiteUser() return currnt site user.

  1. how to get the user created the entity  (api class, method)

You can extend fetch methods like GetOne and GetAllin business layer to populate that field from entity table .

  1. so, i can compare both users to show/hide edit icon

 

Hope Helps

Asad

4/21/2012 3:29:47 PM
Gravatar
Total Posts 12
Ramesh Menta

Re: each user can edit his/her content only

 

Hello Everyone ....

i am developing a Website (networking) wich allow each user to add his/her Calendar Event.

is there any way that just each user can only admin his content instance, none another user cannot see the content of others ...

Suggest me the way.

Thanks in advance.

You must sign in to post in the forums. This thread is closed to new posts.