BrightSide Workbench Full Report + Source Code
org.turro.security.Permission Class Reference

Public Member Functions

boolean check ()
 

Static Public Member Functions

static Permission from (String... roles)
 
static Permission from (Supplier< Boolean > supplier)
 
static Permission from (IContact contact, String... roles)
 
static Permission from (IContact contact, Supplier< Boolean > supplier)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file Permission.java.

Member Function Documentation

◆ check()

boolean org.turro.security.Permission.check ( )

Definition at line 47 of file Permission.java.

47  {
48  if(roles != null) {
49  for(String role : roles) {
50  if(role.contains(":")) {
51  if(isInRole(role)) {
52  return true;
53  }
54  } else {
55  if(hasAnyRoleKey(role)) {
56  return true;
57  }
58  }
59  }
60  }
61  if(supplier != null) {
62  return supplier.get();
63  }
64  return false;
65  }
Here is the caller graph for this function:

◆ from() [1/4]

static Permission org.turro.security.Permission.from ( IContact  contact,
String...  roles 
)
static

Definition at line 87 of file Permission.java.

87  {
88  return new Permission(contact, roles);
89  }

◆ from() [2/4]

static Permission org.turro.security.Permission.from ( IContact  contact,
Supplier< Boolean >  supplier 
)
static

Definition at line 91 of file Permission.java.

91  {
92  return new Permission(contact, supplier);
93  }

◆ from() [3/4]

static Permission org.turro.security.Permission.from ( String...  roles)
static

Definition at line 79 of file Permission.java.

79  {
80  return new Permission(Application.getUser(), roles);
81  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from() [4/4]

static Permission org.turro.security.Permission.from ( Supplier< Boolean >  supplier)
static

Definition at line 83 of file Permission.java.

83  {
84  return new Permission(Application.getUser(), supplier);
85  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: