check_permissions

Function check_permissions 

Source
pub async fn check_permissions(
    map_id: i32,
    pool: &SharedPool,
    user_info: UserInfo,
) -> Result<(), ServiceError>
Expand description

Check if the current user is owner of the map or has the role admin.

ยงErrors

If the connection to the database could not be established. If the user is neither contributer nor owner of the map.