Skip to main content
. 2023 Oct 12;9:e1626. doi: 10.7717/peerj-cs.1626

Algorithm 1. Create a new policy.

Input: object, policyId, subject, environment
Output: Boolean Status
async definePolicy(object, policyId, subject, environment)
{
    if(!object||!policyId||!subject||!environment){
     return false;
   }
    letpolicy={
   Id: policyId,
   subject: subject,
   env: environment
   };
    if(!object.policies){
    object.policies=[];
    }
   object.policies.push(policy);
   return true;
}