private bool HasRealmAccessLevel(ResourceAuthorizationContext context, Realm realm, RealmAccessLevel level) { var actor = GetActor(context); if (actor == null) { return(false); } return(realm.GetAccessLevel(actor) >= level); }