org.cruxframework.crux.core.client.permission
Class Permissions

java.lang.Object
  extended by org.cruxframework.crux.core.client.permission.Permissions

public class Permissions
extends Object

Check if the current user is authorized to realize the job related with given roles.

Author:
Thiago da Rosa de Bustamante

Constructor Summary
Permissions()
           
 
Method Summary
static boolean hasRole(String role)
          Return true if the current user has the given role associated to him
static void markAsUnauthorizedForEdition(com.google.gwt.user.client.ui.HasEnabled widget)
          Notify the given widget that current user has no role for edit its contents
static void markAsUnauthorizedForViewing(com.google.gwt.user.client.ui.IsWidget widget)
          Notify the given widget that current user has no role for view its contents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Permissions

public Permissions()
Method Detail

hasRole

public static boolean hasRole(String role)
Return true if the current user has the given role associated to him

Parameters:
role -
Returns:

markAsUnauthorizedForEdition

public static void markAsUnauthorizedForEdition(com.google.gwt.user.client.ui.HasEnabled widget)
Notify the given widget that current user has no role for edit its contents

Parameters:
widget -

markAsUnauthorizedForViewing

public static void markAsUnauthorizedForViewing(com.google.gwt.user.client.ui.IsWidget widget)
Notify the given widget that current user has no role for view its contents

Parameters:
widget -


Copyright © 2014. All rights reserved.