Features-Available-For-Module-Writers
SkylarHew edited this page 3 years ago

Pending actions

WIP

The orgs library

Variables

  • id - ID number of organization
  • name - string name of organization
  • policies - list of policies in the org (add_org, delete, add_member, remove_member)
  • processes -
  • requests -
  • pending -
  • members - list of members
  • parent - parent org
  • children - children orgs

    Functions

    format of modpol.orgs.function()

  • get_org(arg) - returns org when given its id or name

  • list_all() - returns a table list of all org names

  • user_orgs(user) - returns orgs of a given user

  • reset() - deletes all orgs except for the instance

  • init_instance() - initializes instance (root org), only run once

    Org functions

    format of modpol.orgs:function()

  • record(msg, entry_type) - records a log message in the modpol ledger

  • add_org(name, user) - adds new sub org to org called on

  • delete() - recursively removes org and suborgs

  • get_member_index(member) - internal function to get the index of a member name

  • add_member(user) - adds a user to the org

  • remove_member(user) - removes a user from the org

  • has_member(user) - checks if user is the org

  • list_members() - lists the names of members

  • get_member_count() - returns the amount of members in an org

  • set_policy(policy_type, process_type, must_be_member) - adds a new policy to the policy table, must specify policy type, process type, and if the request must be made by an org member

The interactions library

Functions

  • dashboard(user) - displays a menu with commands to the specified user
  • org_dashboard(user, org_name) - displays menu of org-specific commands to the specified user
  • message(user, message) - prints message to CLI
  • text_query(user, query, func) - calls func on choice
  • binary_poll_user(user, question, func) - polls the user and appliesfunc` to user input