Update multi_institutions.md

This commit is contained in:
lian 2022-02-18 13:13:21 +08:00 committed by GitHub
parent a6cc02e7bd
commit f068a90e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,12 @@ Starting from version 5.1, you can add institutions into Seafile and assign user
In `seahub_settings.py`, add `MULTI_INSTITUTION = True` to enable multi-institution feature. And add
```
# for 7.1.22 or older
EXTRA_MIDDLEWARE_CLASSES += (
'seahub.institutions.middleware.InstitutionMiddleware',
)
# for 8.0.0 or newer
EXTRA_MIDDLEWARE += (
'seahub.institutions.middleware.InstitutionMiddleware',
)
@ -15,12 +21,18 @@ EXTRA_MIDDLEWARE += (
or
```
# for 7.1.22 or older
EXTRA_MIDDLEWARE_CLASSES = (
'seahub.institutions.middleware.InstitutionMiddleware',
)
# for 8.0.0 or newer
EXTRA_MIDDLEWARE = (
'seahub.institutions.middleware.InstitutionMiddleware',
)
```
if `EXTRA_MIDDLEWARE` is not defined.
if `EXTRA_MIDDLEWARE_CLASSES` or `EXTRA_MIDDLEWARE` is not defined.
## Add institutions and institution admins