diff --git a/spa/models/mix.py b/spa/models/mix.py index 26d88d0..d585620 100755 --- a/spa/models/mix.py +++ b/spa/models/mix.py @@ -45,6 +45,11 @@ class Mix(_BaseModel): class Meta: app_label = 'spa' + permissions = ( + ("mix_add_homepage", "Can add a mix to the homepage"), + ("mix_allow_download", "Can allow downloads on a mix"), + ) + objects = MixManager() title = models.CharField(max_length=150) diff --git a/templates/views/UserProfileView.html b/templates/views/UserProfileView.html index c3d1cac..1ea004a 100644 --- a/templates/views/UserProfileView.html +++ b/templates/views/UserProfileView.html @@ -145,7 +145,7 @@
About Me
-
<%= description.replace(/\n/g, '
') %>
+
<%= description %>
diff --git a/templates/views/_MixEditView_Step_Flair.html b/templates/views/_MixEditView_Step_Flair.html index 4c7ce1b..0043f22 100644 --- a/templates/views/_MixEditView_Step_Flair.html +++ b/templates/views/_MixEditView_Step_Flair.html @@ -40,7 +40,7 @@ <% print(download_allowed ? 'checked="checked"' : '') %>> - {% if user.is_staff %} + {% if perms.spa.mix_add_homepage %}