about user and group permissions

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

Locked
impartial49
Posts: 3
Joined: Mon Mar 30, 2015 3:59 pm

about user and group permissions

Post by impartial49 » Mon Mar 30, 2015 5:58 pm

Hi,

What are the different values for the permissions ?
I saw 11 available permissions, but i don't know how to combine them.
Thanks

Emmanuel

mmeschieri
Posts: 235
Joined: Mon Apr 19, 2010 3:40 pm

Re: about user and group permissions

Post by mmeschieri » Thu Apr 02, 2015 7:12 am

You find a description for each permission here: http://docs.logicaldoc.com/en/working-w ... s/security

impartial49
Posts: 3
Joined: Mon Mar 30, 2015 3:59 pm

Re: about user and group permissions

Post by impartial49 » Thu Apr 02, 2015 1:31 pm

But for the web services ?
I'm developper and I want to grant a folder.

Const READ = ?
Const UPLOAD = ?
Const SAVE = ?
Const ADD = ?
Const SECURITY = ?
Const IMMUABLE = ?
Const DELETE = ?
Const RENAME = ?
Const IMPORT = ?
Const EXPORT = ?
Const SIGNATURE = ?


ld_Folder.grantUser(Sid, Folder.id, Account.id, READ && EXPORT, False)

Thanks
Emmanuel

agaspa
Posts: 514
Joined: Tue Apr 20, 2010 8:24 am

Re: about user and group permissions

Post by agaspa » Fri Apr 03, 2015 8:34 am

Hi Emmanuel,
what is the programming language you're working with?

agaspa
Posts: 514
Joined: Tue Apr 20, 2010 8:24 am

Re: about user and group permissions

Post by agaspa » Fri Apr 03, 2015 10:01 am

Hi Emmanuel,

this is a snippet of code in C#

Code: Select all

        private void button13_Click(object sender, EventArgs e)
        {
            const int READ = 1;
            const int WRITE = 2;
            const int ADD = 4;
            const int SECURITY = 8;         
            const int IMMUTABLE= 16; // you can turn the documents in folder to immutable
            const int DELETE= 32;
            const int RENAME= 64;
            const int IMPORT= 128;
            const int EXPORT= 256;
            const int SIGNATURE = 512;
            const int ARCHIVE = 1024;
            const int WORKFLOW = 2048;
            const int DOWNLOAD = 4096;
            const int CALENDAR = 8192;

            Folder.FolderServiceImplService fservice = new Folder.FolderServiceImplService();
            long folderID = fservice.createFolder(SID, 4, "New Folder");
            long userID = 3506176; // The user must exists!

            int permissions = READ ^ EXPORT; // this is a XOR operation

            Console.WriteLine(GetIntBinaryString(READ));
            Console.WriteLine(GetIntBinaryString(EXPORT));
            Console.WriteLine(GetIntBinaryString(permissions));

            fservice.grantUser(SID, folderID, userID, permissions, false);
        }

impartial49
Posts: 3
Joined: Mon Mar 30, 2015 3:59 pm

Re: about user and group permissions

Post by impartial49 » Tue Apr 07, 2015 9:25 am

Thanks a lot. I'll try this.

shrikant
Posts: 18
Joined: Fri Apr 10, 2015 11:56 am

Re: about user and group permissions

Post by shrikant » Tue Apr 14, 2015 7:15 am

Hi agaspa

I am also trying user/Role and Group permission in c#. and try to implement your code posted here but getting error on this method "GetIntBinaryString()".
please could you share the complete function so i can also try.
I have one more requirement could be handle the folder on user role based. if a user has 2 different roles and he has rights in 2 different folder according his role.
when he login at a time one role then he can access only related folder.

awaiting for your kind help.

Regards
Shrikant

agaspa
Posts: 514
Joined: Tue Apr 20, 2010 8:24 am

Re: about user and group permissions

Post by agaspa » Tue Apr 14, 2015 8:28 am

Hi shrikant,
the method GetIntBinaryString() is purely secondary,
its purpose is to return a string in binary format of an integer, you can safely comment those lines.

Security in logicaldoc is managed at the level of folders for performance reasons.
On each folder you can specify a different set of permissions.
This way a user can see a folder and the documents it contains and not see another folder because he does not have read permissions.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests