Hi there.
I wanted to implement a condition for an attribute where the current user can only edit self-created content. Naturally I tried to do add the following condition to the show edit and show delete function.
Activity.Member = LoggedInMember
On save it is stated that:
References are not supported for presentation conditions. Usage of reference Activity.Member is invalid here.
Activity.Member = LoggedInMember
How to accomplish that functionality?
Thanks a lot.
Elmar
Follow-up rules & conditions
I find my self continuously going back to both the manual & the library app & each time I another "layer" of understanding develops. I keep the library app in my current tree in the Configuration Tool so I can open it up without closing out the work I'm doing on my current project. When I'm all done, I then delete the library app from that tree.
Tom
Tom
I might be missing something but IMHO you only nedd to go to the "Access levels" branch in the Configuration Tool, select you BO and give the desired attribute "Creator: full access;others read" permission.I wanted to implement a condition for an attribute where the current user can only edit self-created content.
Hope it helps,
Hubertus
Hi Hubertus.
You are absolutly right. From my explanaition that seemed to be the obvious way to go. What I meant though is that I have an attribute in an BO that´s a BO itself. With BO´s as another BO´s attribute I can define which operation options I want to show the user (edit, delete, view) seperatly.
My desired outcome would be to not even show the delete option to users that are not the owners of that content. I wasn´t sure if setting the access levels would also prevent the edit, delete options to show up in the presentation and just throw an error because of the access level definition.
In short: I wanted to avoid to even show these options in the presentation if the access levels are not sufficient.
Best regards,
Elmar
You are absolutly right. From my explanaition that seemed to be the obvious way to go. What I meant though is that I have an attribute in an BO that´s a BO itself. With BO´s as another BO´s attribute I can define which operation options I want to show the user (edit, delete, view) seperatly.
My desired outcome would be to not even show the delete option to users that are not the owners of that content. I wasn´t sure if setting the access levels would also prevent the edit, delete options to show up in the presentation and just throw an error because of the access level definition.
In short: I wanted to avoid to even show these options in the presentation if the access levels are not sufficient.
Best regards,
Elmar
I found that it is often convenient to set up access rights dynamically. You need to add an attribute like BO.CreatorID and a rule
If BO IS NEW Then BO.CreatorID=LoggedInMember.ID
You can then add a protection rule
If LoggedInMember.ID<> BO.CreatorID
Then PROTECT BO FROM ALL EXCEPT Administrator AND System
Or you can only protect some attributes, even hide them by using READ PROTECT
This approach is similar to setting up Access level to creator only but it allows more flexibility. You may wish to have the BO or an attribute available to other users depending on other attributes. For example, you may only want to block access to records which were entered more than 2 days ago. If you write a record creation day in BO.CreatedOn and initialise it as CURRENT_DATE, then you can add a rule like this one
If LoggedInMember.ID<> BO.CreatorID AND
DAY_DIFFERENCE(BO.CreatedOn, CURRENT_DATE)>2
Then PROTECT BO FROM ALL EXCEPT Administrator AND System
If BO IS NEW Then BO.CreatorID=LoggedInMember.ID
You can then add a protection rule
If LoggedInMember.ID<> BO.CreatorID
Then PROTECT BO FROM ALL EXCEPT Administrator AND System
Or you can only protect some attributes, even hide them by using READ PROTECT
This approach is similar to setting up Access level to creator only but it allows more flexibility. You may wish to have the BO or an attribute available to other users depending on other attributes. For example, you may only want to block access to records which were entered more than 2 days ago. If you write a record creation day in BO.CreatedOn and initialise it as CURRENT_DATE, then you can add a rule like this one
If LoggedInMember.ID<> BO.CreatorID AND
DAY_DIFFERENCE(BO.CreatedOn, CURRENT_DATE)>2
Then PROTECT BO FROM ALL EXCEPT Administrator AND System
Hi greg.
Your answer is very appreciated and valuable. Thanks for making the effort to post this.
There are so many ways to accomplish things in AwareIM that I think it might be a good idea to open up a "Best practices"-Subforum where Users can post Tips on how to get things done easier/better whatever.
Regards,
Elmar
Your answer is very appreciated and valuable. Thanks for making the effort to post this.
There are so many ways to accomplish things in AwareIM that I think it might be a good idea to open up a "Best practices"-Subforum where Users can post Tips on how to get things done easier/better whatever.
Regards,
Elmar