28 lines
640 B
Java
28 lines
640 B
Java
package org.gcube.dataanalysis.dataminer.poolmanager.util;
|
|
|
|
***REMOVED***
|
|
import org.gcube.common.authorization.library.AuthorizationEntry;
|
|
***REMOVED***
|
|
***REMOVED***
|
|
|
|
import static org.gcube.common.authorization.client.Constants.authorizationService;
|
|
|
|
|
|
public class CheckPermission {
|
|
|
|
public CheckPermission() {
|
|
***REMOVED***
|
|
|
|
public static boolean apply(String VREToken, String vre) throws ObjectNotFound, Exception {
|
|
|
|
AuthorizationEntry entry = authorizationService().get(VREToken);
|
|
if (entry.getContext().equals(vre)) {
|
|
System.out.println("OK!");
|
|
return true;
|
|
***REMOVED***
|
|
|
|
return false;
|
|
|
|
***REMOVED***
|
|
***REMOVED***
|