patchmldonkey, a multi-networks file-sharing client - Patches: patch #5125, Multiuser: New datatype cmd_type...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5125: Multiuser: New datatype cmd_type to create classes of commands

Submitter:  spiralvoice <spiralvoice>
Submitted:  Wed 24 May 2006 11:49:36 AM UTC
   
 
Category:  Bug fixes Priority:  5 - Normal
Status:  Wont Do Assigned to:  None
Open/Closed:  Closed

Wed 24 May 2006 11:49:36 AM UTC, original submission:  

To-Do:
let command_allow has to be improved, ideas below.
I am also not sure if I chose a good data structure
to connect group rights and command classes.

Groups are to be created in commonUserDb:
type groupdb = {
    group_name : string;
    group_mail : string;
    group_admin : bool;
    group_server_admin : bool;
    group_can_see_uploads : bool;
    group_read_only : bool;
  }

One user can belong to more than one group.

The bool values in groupdb correspond to CommonTypes.cmd_type
type cmd_type =
( commands for users belonging to groups with group_admin = true or admin_user  )
  Cmd_admin
( commands for users belonging to groups with group_server_admin = true or admin_user  )
| Cmd_server_admin
( commands for users belonging to groups with group_can_see_uploads = true )
| Cmd_upload
( commands for users belonging to groups with group_read_only = true )
| Cmd_read_only

Default group rights for all user will be:
group_admin = true;
group_server_admin = false;
group_can_see_uploads = false;
group_read_only = false;
This means the user can use all MLDonkey functions.
group_admin overrides all other settings and makes
the user commonUserDb.admin_user

Another case:
group_admin = false;
group_server_admin = true;
group_can_see_uploads = false;
group_read_only = false;
Commands marked Cmd_admin are forbidden for this user,
uploads are not visible for this user, user can manage
servers, group_server_admin does not override other settings.

Another case:
group_admin = false;
group_server_admin = true;
group_can_see_uploads = false;
group_read_only = true;
User can not start/pause/resume/cancel downloads, but manage servers.

Another case:
group_admin = false;
group_server_admin = false;
group_can_see_uploads = false;
group_read_only = true;
User can only see downloads where file_owner = user or file_group
is one of the groups the user belongs to.

spiralvoice <spiralvoice>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10045:  5125.patch added by spiralvoice (60KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-05-25 spiralvoice StatusNone Wont Do
    Open/ClosedOpen Closed
2006-05-24 spiralvoice Attached File- Added 5125.patch, #10045
2006-05-24 spiralvoice Attached File#10042 Removed
2006-05-24 spiralvoice Attached File- Added cmd_types.patch, #10042

Back to the top

Powered by Savane 3.13-bb6a.
Corresponding source code