about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBonfaceKilz2021-10-19 16:47:38 +0300
committerBonfaceKilz2021-10-25 14:00:14 +0300
commit182327254fe2964c3dd41aabe49ab99748800a64 (patch)
tree1a4d100c8614f4e125b3fe7318b31d826465e6ad
parent666c0df4c6536b831a2c08ea61c87de8f37a696d (diff)
downloadgenenetwork2-182327254fe2964c3dd41aabe49ab99748800a64.tar.gz
scripts: resource: Add value for "admin" when updating resources
-rwxr-xr-xscripts/authentication/resource.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/authentication/resource.py b/scripts/authentication/resource.py
index 1f5f31d8..4b8d801a 100755
--- a/scripts/authentication/resource.py
+++ b/scripts/authentication/resource.py
@@ -38,14 +38,14 @@ from datetime import datetime
 def recover_hash(name: str, file_path: str, set_function) -> bool:
     """Recover back-ups using the `set_function`
 
-    Parameters:
+    Args:
+      - name: Redis hash where `file_path` will be restored
+      - file_path: File path where redis hash is sourced from
+      - set_function: Function used to do the Redis backup for
+        example: HSET
 
-    - `name`: Redis hash where `file_path` will be restored
-
-    - `file_path`: File path where redis hash is sourced from
-
-    - `set_function`: Function used to do the Redis backup for
-      example: HSET
+    Returns:
+      A boolean indicating whether the function ran successfully.
 
     """
     try:
@@ -99,7 +99,7 @@ if __name__ == "__main__":
         _resource = json.loads(resource)  # str -> dict conversion
         _resource["group_masks"] = {args.group_id: {"metadata": "edit",
                                                     "data": "edit",
-                                                    "admin": "edit-admins"}}
+                                                    "admin": "not-admin"}}
         REDIS_CONN.hset("resources",
                         resource_id,
                         json.dumps(_resource))