basic interaction dashboard, interact callback function in consent module

This commit is contained in:
Luke Miller
2021-07-05 17:32:17 -04:00
parent 7318b8d664
commit 1be8e8b23d
5 changed files with 93 additions and 40 deletions

View File

@@ -70,6 +70,22 @@ function modpol.orgs:wipe_pending_actions(process_id)
modpol.ocutil.log("Removed all pending actions for process #" .. process_id)
end
-- ======================
-- returns a boolean to indicate whether a user has any active pending actions
function modpol.orgs:has_pending_actions(user)
-- next() will return the next pair in a table
-- if next() returns nil, the table is empty
if not self.pending[user] then
return false
else
if not next(self.pending[user]) then
return false
else
return true
end
end
end
-- ===========================
-- compares to requests to see if they are identical
function modpol.orgs.comp_req(req1, req2)