Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/06/08 17:17:55 (5 months ago)
Author:
mseaton
Message:

synchronization_bidirectional_branch: merge from [4734] to [5181].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/data_synchronization_bidirectional/src/api/org/openmrs/api/context/UserContext.java

    r4096 r5183  
    166166        /** 
    167167         * Gives the given privilege to all calls to hasPrivilege. This method was 
    168          * visualized as being used as follows: 
    169          *  
    170          * <code> 
    171          * Context.addProxyPrivilege("AAA"); 
    172          * Context.get*Service().methodRequiringAAAPrivilege(); 
    173          * Context.removeProxyPrivilege("AAA"); 
    174          * </code> 
    175          *  
    176          * @param privilege 
    177          *            to give to users 
     168         * visualized as being used as follows (try/finally is important): 
     169         *  
     170         * <pre> 
     171         * try { 
     172         *   Context.addProxyPrivilege("AAA"); 
     173         *   Context.get*Service().methodRequiringAAAPrivilege(); 
     174         * } 
     175         * finally { 
     176         *   Context.removeProxyPrivilege("AAA"); 
     177         * } 
     178         * </pre> 
     179         *  
     180         * @param privilege to give to users 
    178181         */ 
    179182        public void addProxyPrivilege(String privilege) {