Browse Source

Command descriptions and README update (add an admin)

Bastien Sevajol 9 years ago
parent
commit
244a9ba3c5
3 changed files with 15 additions and 8 deletions
  1. 8 0
      README.md
  2. 4 0
      tracim/tracim/command/ldap_test_server.py
  3. 3 8
      tracim/tracim/command/user.py

+ 8 - 0
README.md View File

@@ -323,6 +323,14 @@ Then add LDAP parameters
323 323
     # If True, LDAP own tracim group managment (not available for now!)
324 324
     ldap_group_enabled = False
325 325
 
326
+You may need an administrator account to manage Tracim. Use the following command (from ``/install/dir/of/tracim/tracim``):
327
+
328
+```
329
+gearbox user create -l admin-email@domain.com -p new_password -g managers -g administrators
330
+```
331
+
332
+Keep in mind ``admin-email@domain.com`` must match with LDAP user.
333
+
326 334
 #### Other parameters  ####
327 335
 
328 336
 There are other parameters which may be of some interest for you. For example, you can:

+ 4 - 0
tracim/tracim/command/ldap_test_server.py View File

@@ -5,6 +5,10 @@ from ldap_test import LdapServer
5 5
 
6 6
 
7 7
 class LDAPTestServerCommand(Command):
8
+
9
+    def get_description(self):
10
+        return '''Run a test LDAP server.'''
11
+
8 12
     def take_action(self, parsed_args):
9 13
         # TODO - B.S. - 20160210: paramètre argv pour preciser les fixtures
10 14
         server = LdapServer(ldap_test_server_fixtures)

+ 3 - 8
tracim/tracim/command/user.py View File

@@ -23,6 +23,9 @@ class UserCommand(AppContextCommand):
23 23
         self._user_api = UserApi(None)
24 24
         self._group_api = GroupApi(None)
25 25
 
26
+    def get_description(self):
27
+        return '''Create or update user.'''
28
+
26 29
     def get_parser(self, prog_name):
27 30
         parser = super().get_parser(prog_name)
28 31
 
@@ -44,14 +47,6 @@ class UserCommand(AppContextCommand):
44 47
         )
45 48
 
46 49
         parser.add_argument(
47
-            "-u",
48
-            "--update",
49
-            help='Update user password if exist',
50
-            dest='update',
51
-            action='store_true'
52
-        )
53
-
54
-        parser.add_argument(
55 50
             "-g",
56 51
             "--add-to-group",
57 52
             help='Add user to group',