Skip to content

Commit

Permalink
Permissions tweak (event_incident_report_type)
Browse files Browse the repository at this point in the history
Backport Py 3.x compat
Version script updater
  • Loading branch information
flavour committed Nov 4, 2021
1 parent 1e8cb95 commit 3ca8ec6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
nursix-dev-3303-gc5b1923 (2019-10-25 10:52:01)
eden-dev-1e8cb9579 (2021-11-04 18:42:36)
6 changes: 3 additions & 3 deletions controllers/req.py
Expand Up @@ -646,6 +646,7 @@ def postp(r, output):
if r.interactive:
if r.method is None:
# Customise Action Buttons
s3_str = s3base.s3_str
if r.component:
s3_action_buttons(r, deletable=s3db.get_config(r.component.tablename, "deletable"))
if r.component.name == "req_item" and \
Expand Down Expand Up @@ -732,7 +733,6 @@ def postp(r, output):
r.next = URL(args=[form_vars.id, "req_skill"])
else:
s3_action_buttons(r, deletable =False)
s3_str = s3base.s3_str
# Add delete button for those records which are not completed
# @ToDo: Handle icons
table = r.table
Expand Down Expand Up @@ -931,7 +931,7 @@ def prep(r):
output = s3_rest_controller("req", "req_item")

if settings.get_req_prompt_match():
req_item_inv_item_btn = {"label": s3_str(T("Request from Facility")),
req_item_inv_item_btn = {"label": s3base.s3_str(T("Request from Facility")),
"url": URL(c = "req",
f = "req_item_inv_item",
args = ["[id]"],
Expand Down Expand Up @@ -1051,7 +1051,7 @@ def req_item_inv_item():
output["items_alt"] = T("No Inventories currently have suitable alternative items in stock")

response.view = "req/req_item_inv_item.html"
s3.actions = [{"label": s3_str(T("Request From")),
s3.actions = [{"label": s3base.s3_str(T("Request From")),
"url": URL(c = request.controller,
f = "req",
args = [req_item.req_id, "req_item"],
Expand Down
6 changes: 5 additions & 1 deletion modules/templates/IFRC/auth_roles.csv
Expand Up @@ -48,13 +48,13 @@ AUTHENTICATED,Authenticated,,,,pr_person,,,READ|UPDATE,,,,
AUTHENTICATED,Authenticated,,,,pr_physical_description,,,READ|CREATE|UPDATE,,,,
reader,All Module Reader,,asset,,,,READ,,,,,
reader,All Module Reader,,event,,,any,READ,,,,,
reader,All Module Reader,,,,event_incident_type,,READ,,,,,
reader,All Module Reader,,gis,poi,,,READ,,,,,
reader,All Module Reader,,gis,poi_type,,,READ,,,,,
reader,All Module Reader,,gis,theme_data,,,READ,,,,,
reader,All Module Reader,,hrm,,,,READ,,,,,
reader,All Module Reader,,hrm,human_resource,,,NONE,,,,,
reader,All Module Reader,,inv,,,,READ,,,,,
reader,All Module Reader,,irs,,,any,READ,,,,,
reader,All Module Reader,,member,,,,READ,,,,,
reader,All Module Reader,,org,,,any,READ,,,,,
reader,All Module Reader,,org,capacity_assessment,,any,NONE,,,,,
Expand Down Expand Up @@ -313,16 +313,19 @@ irs_reader,Incident Reader,,org,,,,READ,,,,,
irs_reader,Incident Reader,,pr,,,,READ,,,,,
irs_reader,Incident Reader,,hrm,hr_search,,,READ,,,,,
irs_data_entry,Incident Data Entry,,event,,,,READ|CREATE,,,,,
irs_data_entry,Incident Data Entry,,,,event_incident_type,,READ,,,,,
irs_data_entry,Incident Data Entry,,org,,,,READ,,,,,Used to filter organisation fields
irs_data_entry,Incident Data Entry,,,,org_organisation,,READ|UPDATE,,,,,Used to filter organisation fields
irs_data_entry,Incident Data Entry,,pr,,,,READ,,,,,
irs_data_entry,Incident Data Entry,,hrm,hr_search,,,READ,,,,,
irs_editor,Incident Editor,,event,,,,READ|CREATE|UPDATE,,,,,
irs_editor,Incident Editor,,,,event_incident_type,,READ,,,,,
irs_editor,Incident Editor,,org,,,,READ|UPDATE,,,,,Used to filter organisation fields
irs_editor,Incident Editor,,,,org_organisation,,READ|UPDATE,,,,,Used to filter organisation fields
irs_editor,Incident Editor,,pr,,,,READ,,,,,
irs_editor,Incident Editor,,hrm,hr_search,,,READ,,,,,
irs_super,Incident Super Editor,,event,,,,READ|CREATE|UPDATE|DELETE,,,,,
irs_super,Incident Super Editor,,,,event_incident_type,,CREATE|READ|UPDATE,,,,,
irs_super,Incident Super Editor,,org,,,,READ|CREATE|UPDATE,,,,,Used to filter organisation fields
irs_super,Incident Super Editor,,,,org_organisation,,READ|CREATE|UPDATE,,,,,Used to filter organisation fields
irs_super,Incident Super Editor,,pr,,,,READ,,,,,
Expand Down Expand Up @@ -716,6 +719,7 @@ vulnerability_super,Vulnerability Super Editor,,hrm,hr_search,,,READ,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,admin,user,,,ALL,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,asset,,,,ALL,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,event,,,,ALL,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,,,event_incident_type,,ALL,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,hrm,,,,ALL,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,inv,,,,ALL,,,,,
ORG_ADMIN,Organisation Admin,Can manage Organisation Users and control all record permissions,irs,,,,ALL,,,,,
Expand Down
8 changes: 5 additions & 3 deletions version.py
@@ -1,9 +1,11 @@
#!/bin/python27/python.exe

import os
import datetime
import subprocess

now = datetime.datetime.today()

version, rest = open("VERSION", "r").read()[1:].split(" ", 1)
output = "r%s (%s)" % (int(version) + 1, str(now)[:-7])
version = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode("ascii").strip()

output = "eden-dev-%s (%s)" % (version, str(now)[:-7])
open("VERSION", "w").write(output)
2 changes: 1 addition & 1 deletion views/pagenav.html
@@ -1,6 +1,6 @@
{{if "page" in request.vars:}}
{{try:}}
{{if totalpages <> 1:}}{{=pagenav(page=page, totalpages=totalpages)}}<br />
{{if totalpages != 1:}}{{=pagenav(page=page, totalpages=totalpages)}}<br />
{{pass}}
{{except:}}
{{try:}}{{=pagenav(page=page)}}<br />
Expand Down
2 changes: 1 addition & 1 deletion views/searchbox.html
@@ -1,6 +1,6 @@
{{if "page" in request.vars:}}
{{try:}}
{{if totalpages <> 1:}}
{{if totalpages != 1:}}
{{=search_btn}}
<p>&nbsp;</p>
{{pass}}
Expand Down

0 comments on commit 3ca8ec6

Please sign in to comment.