Package com.mozilla.grouperfish.model

Examples of com.mozilla.grouperfish.model.Access


    public void testDocuments() {
        assertNotNull(scope(NS).documents());
    }

    public void testMaxLength() {
        Access access = new DummyAccess(Operation.CREATE, "dummy.example.com");
        assertTrue(0 < scope(NS).maxLength(DocumentsResource.class, access));
    }
View Full Code Here


    static Response putAny(final Class<?> resourceType,
                           final Scope ns,
                           final String key,
                           final HttpServletRequest request) throws IOException {

        Access access = new HttpAccess(Operation.CREATE, request);
        if (!ns.allows(resourceType, access)) return FORBIDDEN;

        final int maxLength = ns.maxLength(resourceType, access);
        if (maxLength < request.getContentLength()) return TOO_LARGE;
        final String data = StreamTool.maybeConsume(request.getInputStream(), Charset.forName("UTF-8"), maxLength);
View Full Code Here

TOP

Related Classes of com.mozilla.grouperfish.model.Access

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.