Examples of chgrp()


Examples of org.exist.xmldb.UserManagementService.chgrp()

    public void dbaChownGidCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "admin", "");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to change uid ownership of /db/securityTest1 to the guest group
        ums.chgrp("guest");
    }

    /**
     * Owner can NOT change the owner uid of a collection
     *
 
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

    public void ownerChownGidCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to change gid ownership of /db/securityTest1 to the guest group
        ums.chgrp("guest");
    }

    /**
     * Group member can NOT change the owner uid of a collection
     *
 
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

    public void ownerAndGroupMemberChownGidCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to take gid ownership of /db/securityTest1
        ums.chgrp("extusers");

        final Permission perms = ums.getPermissions(test);
        assertEquals("extusers", perms.getGroup().getName());
    }
   
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

    public void groupMemberChownGidCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test2", "test2");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to take gid ownership of /db/securityTest1/test.xml
        ums.chgrp("users");
    }

    /**
     * Group Member can NOT change owner gid of a collection
     * to a group of which we are NOT a member
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

    public void groupNonMemberChownGidCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test2", "test2");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to take gid ownership of /db/securityTest1
        ums.chgrp("guest");
    }

    /**
     * DBA can change the owner uid of a resource
     *
 
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "admin", "");
        final Resource resource = test.getResource("test.xml");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to change uid ownership of /db/securityTest1/test.xml to the guest group
        ums.chgrp(resource, "guest");
    }

    /**
     * Owner can NOT change the owner uid of a resource
     *
 
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
        final Resource resource = test.getResource("test.xml");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to change gid ownership of /db/securityTest1/test.xml to the guest group
        ums.chgrp(resource, "guest");
    }

   
    /**
     * Group member can NOT change the owner uid of a resource
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
        final Resource resource = test.getResource("test.xml");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to take gid ownership of /db/securityTest1
        ums.chgrp(resource, "extusers");

        final Permission perms = ums.getPermissions(resource);
        assertEquals("extusers", perms.getGroup().getName());
    }
   
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test2", "test2");
        final Resource resource = test.getResource("test.xml");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to take gid ownership of /db/securityTest1/test.xml
        ums.chgrp(resource, "users");

        final Permission perms = ums.getPermissions(resource);
        assertEquals("users", perms.getGroup().getName());
    }
View Full Code Here

Examples of org.exist.xmldb.UserManagementService.chgrp()

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test2", "test2");
        final Resource resource = test.getResource("test.xml");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");

        // attempt to take gid ownership of /db/securityTest1/test.xml
        ums.chgrp(resource, "guest");
    }

    @Test
    public void onlyExecuteRequiredToOpenCollectionContent() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test1", "test1");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.