]> git.parisson.com Git - telemeta.git/commitdiff
Fix user analysis run permission
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 7 Feb 2018 09:05:52 +0000 (10:05 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 7 Feb 2018 09:05:52 +0000 (10:05 +0100)
telemeta/locale
telemeta/views/item.py

index 7b6669b1288aa31296de7f845af128ef88fd2d4e..c3df358c0aaae94be1f288a3e3a67f6a94c9165f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7b6669b1288aa31296de7f845af128ef88fd2d4e
+Subproject commit c3df358c0aaae94be1f288a3e3a67f6a94c9165f
index 56210b2adc850b291385cadb2ded489bc6694e57..0cca438619754dde40297746b561fb22740b894e 100644 (file)
@@ -54,11 +54,10 @@ class ItemBaseMixin(TelemetaBaseMixin):
         user = self.request.user
         graphers_access = (user.is_staff
                            or user.is_superuser
-                           or user.has_perm('can_run_analysis'))
+                           or user.has_perm('telemeta.can_run_analysis'))
 
         for grapher in self.graphers:
-            if (not graphers_access
-                and grapher.id() not in self.public_graphers):
+            if (graphers_access or grapher.id() in self.public_graphers):
                 continue
             if grapher.id() == self.default_grapher_id:
                 graphers.insert(0, {'name': grapher.name(), 'id': grapher.id()})