Created
August 13, 2020 02:49
-
-
Save techforum-repo/c3fc695995933113fd87b0d65ad0a80e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.servlet.http.HttpServletRequest; | |
import org.apache.jackrabbit.api.security.user.User; | |
import org.osgi.service.component.annotations.Component; | |
import com.adobe.granite.oauth.server.Scope; | |
import com.adobe.granite.oauth.server.ScopeWithPrivileges; | |
@Component(service=Scope.class) | |
public class DAMReadScope implements ScopeWithPrivileges{ | |
private static final String DAM_RESOURCE_URI="/content/dam/digital"; | |
private static final String DAM_RESOURCE_READ_SCOPE_NAME="dam_read"; | |
public DAMReadScope() | |
{ | |
} | |
@Override | |
public String getDescription(HttpServletRequest arg0) { | |
return "Read DAM Assets"; | |
} | |
@Override | |
public String getEndpoint() { | |
return null; | |
} | |
@Override | |
public String getName() { | |
return DAM_RESOURCE_READ_SCOPE_NAME; | |
} | |
@Override | |
public String getResourcePath(User user) { | |
return DAM_RESOURCE_URI; | |
} | |
@Override | |
public String[] getPrivileges() { | |
return new String[] {"jcr:read"}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment