Skip to content

Commit d50e147

Browse files
authored
Fix perms bug (#56)
* Fixed a permissions issue * Bumped version
1 parent 27f72c4 commit d50e147

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The application will run in a Kubernetes cluster, so we need a container image f
8686
Creating the container image might take several minutes, so this is a good point to take a break. When you return, you should see the following output:
8787

8888
> ```
89-
> Packed dashboard_0.22_amd64.rock
89+
> Packed dashboard_0.23_amd64.rock
9090
> ```
9191
9292
### Create a charm
@@ -109,10 +109,10 @@ Creating the charm might take several minutes, so this is another good point to
109109
``` { name=deploy-dashboard }
110110
cd ~/dashboard
111111
rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false \
112-
oci-archive:dashboard_0.22_amd64.rock \
113-
docker://localhost:32000/dashboard:0.22
112+
oci-archive:dashboard_0.23_amd64.rock \
113+
docker://localhost:32000/dashboard:0.23
114114
juju deploy ./charm/dashboard_ubuntu-22.04-amd64.charm \
115-
--resource django-app-image=localhost:32000/dashboard:0.22
115+
--resource django-app-image=localhost:32000/dashboard:0.23
116116
```
117117
118118
The `rockcraft.skopeo` command makes the container image available to Juju.

dashboard/projects/templates/projects/partial_condition.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
{{ condition.name }}
2323
<div class="attributes">
2424
<span
25-
{% if not perms.projects.change_condition %}
25+
{% if not perms.projects.change_projectobjectivecondition %}
2626
class="condition not-applicable"
2727
{% else %}
28-
class="condition candidate not-applicable"
28+
class="condition not-applicable has-perms"
2929
hx-put="{% url 'projects:action_condition_toggle_not_applicable' condition.id %}"
3030
hx-trigger="click"
3131
hx-target="closest tr"
3232
hx-swap="outerHTML"
3333
{% endif %}>na</span>
3434
<span
35-
{% if not perms.projects.change_condition %}
35+
{% if not perms.projects.change_projectobjectivecondition %}
3636
class="condition candidate"
3737
{% else %}
3838
class="condition candidate has-perms"

dashboard/projects/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def action_toggle_commitment(request, commitment_id):
134134
return HttpResponse("")
135135

136136

137-
@permission_required("projects.change_condition")
137+
@permission_required("projects.change_projectobjectivecondition")
138138
@require_http_methods(["PUT"])
139139
def action_toggle_condition(request, condition_id):
140140
condition = ProjectObjectiveCondition.objects.get(id=condition_id)
@@ -151,7 +151,7 @@ def action_toggle_condition(request, condition_id):
151151
)
152152

153153

154-
@permission_required("projects.change_condition")
154+
@permission_required("projects.change_projectobjectivecondition")
155155
@require_http_methods(["PUT"])
156156
def action_condition_toggle_candidate(request, condition_id):
157157
condition = ProjectObjectiveCondition.objects.get(id=condition_id)
@@ -168,7 +168,7 @@ def action_condition_toggle_candidate(request, condition_id):
168168
)
169169

170170

171-
@permission_required("projects.change_condition")
171+
@permission_required("projects.change_projectobjectivecondition")
172172
@require_http_methods(["PUT"])
173173
def action_condition_toggle_not_applicable(request, condition_id):
174174
condition = ProjectObjectiveCondition.objects.get(id=condition_id)

rockcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: dashboard
22
# see https://documentation.ubuntu.com/rockcraft/en/1.8.0/explanation/bases/
33
# for more information about bases and using 'bare' bases for chiselled rocks
44
base: ubuntu@22.04 # the base environment for this Django application
5-
version: "0.22" # just for humans. Semantic versioning is recommended
5+
version: "0.23" # just for humans. Semantic versioning is recommended
66
summary: A summary of your Django application # 79 char long summary
77
description: |
88
Dashboard is a Django application to track quality and progress of multiple

0 commit comments

Comments
 (0)