[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] [patch #5125] Multiuser: New datatype cmd_type to creat
From: |
spiralvoice |
Subject: |
[Mldonkey-users] [patch #5125] Multiuser: New datatype cmd_type to create classes of commands |
Date: |
Wed, 24 May 2006 13:49:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.8.0.3) Gecko/20060505 Firefox/1.5.0.3 |
URL:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=5125>
Summary: Multiuser: New datatype cmd_type to create classes
of commands
Project: mldonkey, a multi-networks file-sharing client
Submitted by: spiralvoice
Submitted on: Mittwoch 24.05.2006 um 13:49
Category: Bug fixes
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mittwoch 24.05.2006 um 13:49 Name: cmd_types.patch Size: 58,92KB
By: spiralvoice
<http://savannah.nongnu.org/patch/download.php?file_id=10042>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=5125>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [Mldonkey-users] [patch #5125] Multiuser: New datatype cmd_type to create classes of commands,
spiralvoice <=