Examples of chown()


Examples of org.exist.xmldb.CollectionManagementServiceImpl.chown()

                    final Account u = mgtService.getAccount(args[1]);
                    if (u == null) {
                        System.out.println("unknown user");
                        return true;
                    }
                    mgtService.chown(u, args[2]);
                    System.out.println("owner changed.");
                    getResources();
                    return true;
                }
                final Resource res = current.getResource(args[3]);
View Full Code Here

Examples of org.exist.xmldb.CollectionManagementServiceImpl.chown()

                    final Account u = mgtService.getAccount(args[1]);
                    if (u == null) {
                        System.out.println("unknown user");
                        return true;
                    }
                    mgtService.chown(res, u, args[2]);
                    getResources();
                    return true;
                }
                System.err.println("Resource " + args[3] + " not found.");
               
View Full Code Here

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

                    final Account u = mgtService.getAccount(args[1]);
                    if (u == null) {
                        System.out.println("unknown user");
                        return true;
                    }
                    mgtService.chown(u, args[2]);
                    System.out.println("owner changed.");
                    getResources();
                    return true;
                }
                final Resource res = current.getResource(args[3]);
View Full Code Here

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

                    final Account u = mgtService.getAccount(args[1]);
                    if (u == null) {
                        System.out.println("unknown user");
                        return true;
                    }
                    mgtService.chown(res, u, args[2]);
                    getResources();
                    return true;
                }
                System.err.println("Resource " + args[3] + " not found.");
               
View Full Code Here

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

            CollectionManagementService cms = (CollectionManagementService)root.getService("CollectionManagementService", "1.0");
            Collection test = cms.createCollection(TEST_COLLECTION);
            UserManagementService ums = (UserManagementService) test.getService("UserManagementService", "1.0");
            // change ownership to guest
            Account guest = ums.getAccount(GUEST_UID);
            ums.chown(guest, guest.getPrimaryGroup());
            ums.chmod(Permission.DEFAULT_COLLECTION_PERM);

            assertNotNull("Could not connect to database.");
            System.out.println("<<<\n");
        } catch (Exception e) {
View Full Code Here

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

    public void worldChownCollection() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "guest", "guest");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");
        final Account guest = ums.getAccount("guest");
        // make myself the owner ;-)
        ums.chown(guest, "guest");
    }

    /**
     * only the owner or dba can chown a collection or resource
     */
 
View Full Code Here

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

        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "guest", "guest");
        final Resource resource = test.getResource("test.xml");
        final UserManagementService ums = (UserManagementService)test.getService("UserManagementService", "1.0");
        // grant myself all rights ;-)
        final Account test2 = ums.getAccount("guest");
        ums.chown(resource, test2, "guest");
    }

    @Test
    public void groupCreateSubColl() throws XMLDBException {
        final Collection test = DatabaseManager.getCollection(baseUri + "/db/securityTest1", "test2", "test2");
View Full Code Here

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

        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 test2 user
        final Account test2 = ums.getAccount("test2");
        ums.chown(test2);
    }

    /**
     * DBA can change the owner gid of a collection
     *
 
View Full Code Here

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

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

        // attempt to change uid ownership of /db/securityTest1 to the test2 user
        final Account test2 = ums.getAccount("test2");
        ums.chown(test2);
    }

    /**
     * Owner can NOT change the owner gid of a collection
     * to a group of which they are not a member
View Full Code Here

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

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

        // attempt to take uid ownership of /db/securityTest1
        final Account test2 = ums.getAccount("test2");
        ums.chown(test2);
    }

    /**
     * Owner can change the owner gid of a collection
     * to a group of which they are a member
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.