public void checkPermission(Object object,NamespacePermissionEnum[] permissions){
  List<AccessDeniedException> accessDeniedExceptions=new ArrayList<>();
  checkPermission(object,permissions,accessDeniedExceptions);
  if (!accessDeniedExceptions.isEmpty()) {
    throw getAccessDeniedException(accessDeniedExceptions);
  }
}

public void checkPermission ( Object object , NamespacePermissionEnum [ ] permissions ) { List < AccessDeniedException > accessDeniedExceptions = new ArrayList < > ( ) ; checkPermission ( object , permissions , accessDeniedExceptions ) ; if ( ! accessDeniedExceptions . isEmpty ( ) ) { throw getAccessDeniedException ( accessDeniedExceptions ) ; } }
checks the current user ' s permissions against the given object which may represent a single or multiple namespaces . allowed types are string or collection of string .
