significant progress! a working process from beginning to end can be seen in test/org_req_test.lua
This commit is contained in:
+14
-1
@@ -271,7 +271,8 @@ end
|
||||
function modpol.orgs:list_member()
|
||||
local str
|
||||
for k, v in ipairs(self.members) do
|
||||
if str then
|
||||
-- checking to see if member name is valid
|
||||
if str and str ~= '' then
|
||||
str = str .. '\n' .. v
|
||||
else
|
||||
str = v
|
||||
@@ -280,6 +281,18 @@ function modpol.orgs:list_member()
|
||||
return str
|
||||
end
|
||||
|
||||
-- ==============================
|
||||
-- because member list uses lazy deletion, using #org.members will not show an accurate number
|
||||
function modpol.orgs:get_member_count()
|
||||
local count = 0
|
||||
for k, v in ipairs(self.members) do
|
||||
-- the empty string represents a deleted member in the members list
|
||||
if v ~= '' then
|
||||
count = count + 1
|
||||
end
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user