#101 Team sharing form
* adds team sharing field to share form * splits sharing logic into user based and teams based * adds TeamAdmin for admin backend * adds validity check on Team name -> only unused names shall be valid
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from user.models import UserNotification, UserActionLogEntry, User
|
||||
from user.models import UserNotification, UserActionLogEntry, User, Team
|
||||
|
||||
|
||||
class UserNotificationAdmin(admin.ModelAdmin):
|
||||
@@ -64,7 +64,20 @@ class UserActionLogEntryAdmin(admin.ModelAdmin):
|
||||
]
|
||||
|
||||
|
||||
class TeamAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
"name",
|
||||
"description",
|
||||
"admin",
|
||||
]
|
||||
search_fields = [
|
||||
"name",
|
||||
"description",
|
||||
]
|
||||
|
||||
|
||||
admin.site.register(User, UserAdmin)
|
||||
admin.site.register(Team, TeamAdmin)
|
||||
|
||||
# Outcommented for a cleaner admin backend on production
|
||||
#admin.site.register(UserNotification, UserNotificationAdmin)
|
||||
|
||||
Reference in New Issue
Block a user