mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-31 22:19:54 +00:00
Added custom permissions to mix (homepage & downloads)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<div class="profile-info-row">
|
||||
<div class="profile-info-name"> About Me</div>
|
||||
<div class="profile-info-value">
|
||||
<div class="usereditable" id="about" style="display: inline; white-space:pre-wrap;"><%= description.replace(/\n/g, '<br />') %></div>
|
||||
<div class="usereditable" id="about" style="display: inline; white-space:pre-wrap;"><%= description %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<% print(download_allowed ? 'checked="checked"' : '') %>>
|
||||
<span class="lbl" for="download_allowed"></span>
|
||||
</label>
|
||||
{% if user.is_staff %}
|
||||
{% if perms.spa.mix_add_homepage %}
|
||||
<label class="inline">
|
||||
<small class="muted">Homepage:</small>
|
||||
<input class="ace ace-switch ace-switch-7"
|
||||
@@ -53,4 +53,4 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user