mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr...
Date: Sun, 29 Oct 2006 23:59:37 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/10/29 23:59:37

Modified files:
        distrib        : ChangeLog 
        src/daemon/driver: driverCommands.ml 

Log message:
        patch #5488

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1071&r2=1.1072
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.190&r2=1.191

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1071
retrieving revision 1.1072
diff -u -b -r1.1071 -r1.1072
--- distrib/ChangeLog   29 Oct 2006 18:58:59 -0000      1.1071
+++ distrib/ChangeLog   29 Oct 2006 23:59:36 -0000      1.1072
@@ -14,6 +14,12 @@
 ChangeLog
 =========
 
+2006/10/30
+5488: Multiuser: New commands
+- groups -> displays groups of the logged-in user
+- dgroup -> displays default group of the logged-in user
+- restrict command "unshare" to admin users
+
 2006/10/29
 5475: Multiuser: Implement user_commit_dir
 - directories with strategy incoming_files are shared recursively now

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -b -r1.190 -r1.191
--- src/daemon/driver/driverCommands.ml 25 Oct 2006 19:21:27 -0000      1.190
+++ src/daemon/driver/driverCommands.ml 29 Oct 2006 23:59:37 -0000      1.191
@@ -2233,6 +2233,7 @@
 
     "unshare", Arg_one (fun arg o ->
 
+       if user2_is_admin o.conn_user.ui_user_name then begin
         let found = ref false in
         shared_directories =:= List.filter (fun sd ->
             let diff = sd.shdir_dirname <> arg in
@@ -2251,8 +2252,10 @@
             _s "directory removed"
           end else
           _s "directory already unshared"
-
-    ), "<dir> :\t\t\t\tshare directory <dir>";
+         end
+        else
+         _s "You are not allowed to unshare directories"
+    ), "<dir> :\t\t\t\tunshare directory <dir>";
 
     "upstats", Arg_none (fun o ->
         let buf = o.conn_buf in
@@ -3132,6 +3135,16 @@
         _s ""
     ), "\t\t\t\t\tprint logged-in user name";
 
+    "groups", Arg_none (fun o ->
+       print_command_result o o.conn_buf (String.concat " " 
(user2_user_groups_safe o.conn_user.ui_user_name));
+        _s ""
+    ), "\t\t\t\t\tprint groups of logged-in user";
+
+    "dgroup", Arg_none (fun o ->
+       print_command_result o o.conn_buf (user2_print_user_default_group 
o.conn_user.ui_user_name);
+        _s ""
+    ), "\t\t\t\t\tprint default group of logged-in user";
+
     "chgrp", Arg_two (fun group filenum o ->
         let num = int_of_string filenum in
         try




reply via email to

[Prev in Thread] Current Thread [Next in Thread]