Skip to main content
Explore this module further in the Mover Registry: @sage/shared

Structs

Moderation

Table of Users authorized to take moderator actions on a forum.

Constants

Represents that the moderator is the owner.
Represents that the moderator has the lowest permissions.
Represents that a moderator was added.
Represents that a moderator was removed.
Error code used when a moderator tries to remove the owner.
Error code used when a non-moderator attempts a moderator action.
Error code used when a non-owner attempts an owner action.

Functions

assert_is_moderator

Aborts with EIsNotModerator if the user is not a moderator or owner.

assert_is_owner

Aborts with EIsNotOwner if the user is not the owner.

create

Creates a new Moderation instance.

get_length

Get number of moderators and owners.

is_moderator

Returns true or false based on whether the address is a moderator.

is_owner

Returns true or false based on whether the address is the owner.

make_moderator

Adds the address as a moderator.

make_owner

Adds the address as the owner.

remove_moderator

Removes the address as a moderator. Aborts with EIsOwner if attempting to remove the owner.