Explorar el Código

Command descriptions and README update (add an admin)

Bastien Sevajol hace 9 años
padre
commit
244a9ba3c5
Se han modificado 3 ficheros con 15 adiciones y 8 borrados
  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 Ver fichero

323
     # If True, LDAP own tracim group managment (not available for now!)
323
     # If True, LDAP own tracim group managment (not available for now!)
324
     ldap_group_enabled = False
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
 #### Other parameters  ####
334
 #### Other parameters  ####
327
 
335
 
328
 There are other parameters which may be of some interest for you. For example, you can:
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 Ver fichero

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

+ 3 - 8
tracim/tracim/command/user.py Ver fichero

23
         self._user_api = UserApi(None)
23
         self._user_api = UserApi(None)
24
         self._group_api = GroupApi(None)
24
         self._group_api = GroupApi(None)
25
 
25
 
26
+    def get_description(self):
27
+        return '''Create or update user.'''
28
+
26
     def get_parser(self, prog_name):
29
     def get_parser(self, prog_name):
27
         parser = super().get_parser(prog_name)
30
         parser = super().get_parser(prog_name)
28
 
31
 
44
         )
47
         )
45
 
48
 
46
         parser.add_argument(
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
             "-g",
50
             "-g",
56
             "--add-to-group",
51
             "--add-to-group",
57
             help='Add user to group',
52
             help='Add user to group',