Function controller_can_write

Source
pub fn controller_can_write(caller: UserId, controllers: &Controllers) -> bool
Expand description

Checks if a caller is a controller with admin or write scope (permissions).

§Arguments

  • caller: UserId of the caller.
  • controllers: Reference to the current set of controllers.

§Returns

true if the caller is a controller (not anonymous, calling itself or one of the known write or admin controllers), otherwise false.