Add documentation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 3.0.8 on 2020-07-30 14:15
|
||||
# Generated by Django 3.1.3 on 2020-11-27 11:47
|
||||
|
||||
import apps.api.models
|
||||
from django.conf import settings
|
||||
|
@@ -55,7 +55,7 @@ class Token(MetaDataModel):
|
||||
"""Boolean check if the token is belonging to a user with super user rights. Then this token is a super token.
|
||||
|
||||
Returns:
|
||||
bool: Returns true when the token belongs to a super user.
|
||||
Boolean: Returns true when the token belongs to a super user.
|
||||
"""
|
||||
# TODO: Is it allowed to be a super user and researcher? Could give conflict of interests. With the API token you can read other researchers data...
|
||||
return self.user.is_superuser == True
|
||||
|
@@ -17,7 +17,7 @@ def create_user_token(sender, instance=None, created=False, **kwargs):
|
||||
instance: :attr:`~django.contrib.auth.models.User`
|
||||
The newly created user model data
|
||||
|
||||
created : boolean
|
||||
created : Boolean
|
||||
Wether the object was created (True) or updated (False).
|
||||
"""
|
||||
if created:
|
||||
|
Reference in New Issue
Block a user