[opencms-dev] Finding who edited the page

Pavel Peringer pavel.peringer at qbizm.cz
Fri Mar 2 16:01:34 CET 2007


Maybe this part of code should be usefull:

CmsJspActionElement cmsJsp = new CmsJspActionElement(pageContext, 
request, response);
CmsObject cmsObject = cmsJsp.getCmsObject();
CmsRequestContext cmsContext = cmsJsp.getRequestContext();

String requestFile = cmsContext.getUri();
CmsResource resource = CmsObject.readResource(requestFile);
CmsUUID userUUID = resource.getUserLastModified();
CmsUser user = cmsObject.readUser(userUUID);

out.println("Last modified by: " + user.getFirstname() + " " + 
user.getLastname());

HTH

Pavel Peringer

Saif E. Abayazid napsal(a):

>Thanks Carl. That will display who is currently loged in. What I'm trying to do is to display on the page itself (the edited page) who edited it and date of editing, cuase I will be dealing with different departments and in each department there are more than one editor.
>
>Thanks.
>
> 
>---- Original message ----
>  
>
>>Date: Fri, 2 Mar 2007 09:40:00 +0100
>>From: "Carl Alex Friis Nielsen" <cfn at kb.dk>  
>>Subject: RE: [opencms-dev] Finding who edited the page  
>>To: "The OpenCms mailing list" <opencms-dev at opencms.org>
>>
>>You can also get the workplace to display it in the explorer
>>(you set which attributes of the resources to display in
>>the preferences dialog).
>>
>>Cheers,
>>
>>Carl
>>
>>    
>>
>>>-----Original Message-----
>>>From: opencms-dev-bounces at opencms.org@KB On Behalf Of "Chris Tiernan"
>>><CTiernan at salesforce.com>
>>>Sent: Thursday, March 01, 2007 12:19 AM
>>>To: abayazid at uiuc.edu; The OpenCms mailing list
>>>Subject: RE: [opencms-dev] Finding who edited the page
>>>
>>>
>>>You can see who edited the page by viewing the history of the 
>>>file (file
>>>      
>>>
>>>>context menu > History).  That will show you their 
>>>>        
>>>>
>>>username, at which
>>>point, you can cross reference them in Account Management
>>>(Administration > Account Management > User Management).
>>>
>>>-----Original Message-----
>>>From: opencms-dev-bounces at opencms.org
>>>[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Saif E. Abayazid
>>>Sent: Wednesday, February 28, 2007 2:58 PM
>>>To: opencms-dev at opencms.org
>>>Subject: [opencms-dev] Finding who edited the page
>>>
>>>Hi every one. 
>>>
>>>Can I find out who edied the page? i.e the information of the user who
>>>edited the page. His/her username, password etc..?
>>>
>>>Any help please.
>>>
>>>Thanks
>>>
>>>_______________________________________________
>>>This mail is sent to you from the opencms-dev mailing list
>>>To change your list options, or to unsubscribe from the list, please
>>>visit
>>>http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>>_______________________________________________
>>>This mail is sent to you from the opencms-dev mailing list
>>>To change your list options, or to unsubscribe from the list, 
>>>please visit
>>>http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>>
>>>      
>>>
>>_______________________________________________
>>This mail is sent to you from the opencms-dev mailing list
>>To change your list options, or to unsubscribe from the list, please visit
>>http://lists.opencms.org/mailman/listinfo/opencms-dev
>>    
>>
>Saif E. Abayazid         Research Programmer             
>Library System Office    University of Illinois at Urbana Champaign
>314LibraryMC522          Email:abayazid at uiuc.edu 
>1408 West Gregory Dr.    Phone: 217-244-6256 
>Urbana,IL 61801          Fax  : 217-244-4358          
>
>_______________________________________________
>This mail is sent to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://lists.opencms.org/mailman/listinfo/opencms-dev
>  
>

-- 
Bc. Pavel Peringer                          Qbizm technologies, a.s.
Developer                                   ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz    www.qbizm.cz      www.qbizm-services.cz




More information about the opencms-dev mailing list