"Fossies" - the Fresh Open Source Software Archive

Member "seahub-7.1.0-pro/HACKING" (30 Dec 2019, 2644 Bytes) of package /linux/www/seahub-7.1.0-pro.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 About Registration
    3 ==================
    4 
    5 We use a customized registration process based on thirdpart/registration. 
    6 The customization begins with:
    7 
    8    (r'^accounts/', include('base.registration_urls'))
    9 
   10 See base.registration_urls to follow the code.
   11 
   12 Registration is seperated into two phase: registration and activation.
   13 
   14     Registration Page with Form -----> Registration Complete Page 
   15                                       (Notify User to check mail)
   16                                            |
   17                                            |
   18                                            V
   19                                      User check email and click activate link
   20                                            |
   21                                            |
   22                                            V
   23        User Home Page          <----- Activate and login User.
   24                                            
   25 
   26 The registration app provide two view functions, i.e., `register` and `activate`.
   27 
   28 ### Register
   29 
   30 The actual registration of the account will be delegated to the
   31 backend; it will be used as follows:
   32 
   33 1. The backend's ``registration_allowed()`` method will be called,
   34    passing the ``HttpRequest``, to determine whether registration of
   35    an account is to be allowed; if not, a redirect is issued to the
   36    view corresponding to the named URL pattern
   37    ``registration_disallowed``.
   38 
   39 2. The form to use for account registration will be obtained by
   40    calling the backend's ``get_form_class()`` method, passing the
   41    ``HttpRequest``.
   42 
   43 3. If valid, the form's ``cleaned_data`` will be passed (as keyword
   44    arguments, and along with the ``HttpRequest``) to the backend's
   45    ``register()`` method, which should return the new ``User`` object.
   46 
   47 4. Upon successful registration, the backend's
   48    ``post_registration_redirect()`` method will be called, passing the
   49    ``HttpRequest`` and the new ``User``, to determine the URL to
   50    redirect the user to.
   51  
   52 
   53 We use a customized backend: seahub.base.accounts.RegistrationBackend
   54 
   55 ### Registration Process
   56 
   57 Process 1:
   58 1. User register
   59 2. Admin activate
   60 3. User login and bind ccnet ID
   61 
   62 To Enable this process, just set
   63 
   64     REGISTRATION_SEND_MAIL = False
   65 
   66 Process 2:
   67 1. User register and receive activation email
   68 2. User active account and bind ccnet ID
   69 
   70 Process 3:
   71 1. Admin add user
   72 2. User login and bind ccnet ID
   73 
   74 About Authentication
   75 ====================
   76 
   77 We use a custimized authentication method. See
   78 seahub.base.accounts.EmailOrUsernameModelBackend
   79 
   80 AUTHENTICATION_BACKENDS = (
   81     'seahub.base.accounts.EmailOrUsernameModelBackend',
   82     'django.contrib.auth.backends.ModelBackend'
   83 )