[opencms-dev] Adding removing functionality

Thomas Maerz thomasmaerz at gmx.de
Fri Jul 8 09:41:10 CEST 2005


Saeed Meerkhan <saeed.me at gmail.com> writes:

> I want to add a removing functionality to a page that contains replies
> to an article,  so that only certain system users can delete a reply
> or more, while this functionality would not be visible to web users.
> How can I do that?

Create a file, restrict its ACL to the certain system users.


| boolean allowedToDeleteReply = true;
| try
| {
|     cmsObject.readResource( "/path/to/acl/file" );
| }
| catch( CmsException e )
| {
|     allowedToDeleteReply = false;
| }
| 
| if( allowedToDeleteReply )
| {
|     //
| }


Regards,
Thomas




More information about the opencms-dev mailing list