Some unfinished, broken additions to processes

This commit is contained in:
Nathan Schneider
2021-02-20 22:48:17 -07:00
parent bf309aa63d
commit 4f53e801c4
2 changed files with 52 additions and 22 deletions

View File

@@ -189,15 +189,25 @@ end
-- rename_org(old_name, new_name)
-- Renames an org
-- ===================================================================
-- POLICIES
-- Each policy is a table with a string for a key. Contents:
-- KEY - name of the policy (string)
-- [member orgs]: external orgs allowed to call policy
-- [function]: the function that initiates the policy
-- ===================================================================
-- ===================================================================
-- modpol.add_policy
-- Adds a policy to an org's [org].policies table
-- Params: org_name (string), target_function (string),
-- policy_function (string)
-- function names should be in the form [module?.][function]
-- and can be modpol.delegate(org_name)
-- Params: org_name (string),
-- policy_name (string),
-- policy_table (table)
-- Output: true if successful, nil if error
modpol.add_policy = function(org_name, target_function, policy_function)
-- TKTK NEEDS TO BE REWRITTEN
modpol.add_policy = function(org_name, policy_name, policy_table)
-- first, basic checks
local message = "Error: No such org"
if (modpol.orgs[org_name] == nil) then