1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- Ledger
- **************************
- a legder is a table of records that holds the history of an org, and of modpol itself.
- its structure is a table of legder entries.
- Every org has one, starting with the entry recording its creation.
- Ledger Entry
- **************************
- a legder entry is a table with the following properties:
- timestamp = nil,
- entrytype = nil,
- action_msg = '',
- the timestamp will hold the output of os.time at the moment the entry was created.
- the entrytype is optional; it can hold an identifier of the kind of entry it is (e.g. 'org_init', 'new_user', etc etc.)
- action_msg is the record output itself.
- Entrytypes
- **************************
- These are the entrytypes that modpol uses. Each additional module should document whatever entrytypes it adds.
- 'org_init'
- type used when an org is created
- 'org_purge'
- type used when all orgs are purged. -- will only be found in the main modpol ledger.
- 'org_remove'
- type used when removing an individual org
- 'add_member'
- type used when adding a member to an org
- 'remove_member'
- type used when removing a member from an org
- Old orgs
- **************************
- when an org is removed, its ledger is stored in modpol.old_legders = {} Note that multiple ledgers may exist here with the same org name.
|