public boolean permissionsContainOwnKeyword ( User user , ParaObject object ) { if ( user == null || object == null ) { return false ; } String resourcePath1 = object . getType ( ) ; String resourcePath2 = object . getObjectURI ( ) . substring ( 1 ) ; // remove first '/' String resourcePath3 = object . getPlural ( ) ; return hasOwnKeyword ( App . ALLOW_ALL , resourcePath1 ) || hasOwnKeyword ( App . ALLOW_ALL , resourcePath2 ) || hasOwnKeyword ( App . ALLOW_ALL , resourcePath3 ) || hasOwnKeyword ( user . getId ( ) , resourcePath1 ) || hasOwnKeyword ( user . getId ( ) , resourcePath2 ) || hasOwnKeyword ( user . getId ( ) , resourcePath3 ) ; }
Check if the permissions map contains OWN keyword which restricts access to objects to their creators .