Removed org.policies table; policies are now handled in the org.modules[module].config table.

This commit is contained in:
Nathan Schneider
2022-02-06 13:45:31 -07:00
parent b92272afa2
commit 8086b18879
3 changed files with 4 additions and 37 deletions

View File

@ -15,7 +15,6 @@ function temp_org()
id = nil,
name = nil,
modules = modpol.util.copy_table(modpol.modules),
policies = {},
processes = {},
pending = {},
members = {},
@ -317,21 +316,3 @@ function modpol.orgs:get_member_count()
end
return count
end
--- Adds a new policy to the policy table.
-- Must define the policy type, process associated with it, and whether the request must be made by an org member
-- @function modpol.orgs:set_policy
-- @param policy_type
-- @param process_type
-- @param must_be_member Boolean
function modpol.orgs:set_policy(policy_type, process_type, must_be_member)
local new_policy = {
process_type = process_type,
must_be_member = must_be_member
}
self.policies[policy_type] = new_policy
modpol.ocutil.log('Added policy for ' .. policy_type .. ' in ' .. self.name)
self:record('Added policy for ' .. policy_type, 'set_policy')
end