Skip to main content

is_write_access_key

Function is_write_access_key 

Source
pub fn is_write_access_key(id: Principal, access_keys: &AccessKeys) -> bool
Expand description

Checks if an id is a non-expired access key with admin or write scope (permissions).

§Arguments

  • id: Principal of e.g. the caller.
  • access_keys: Reference to the current set of access keys.

§Returns

true if the id is an access key (not anonymous, calling itself or one of the known write or admin access keys), otherwise false.