public static Boolean CanAppAdmin(IUser user, IMember owner, Type appType, int appInstanceId) { int roleId = ((User)user).RoleId; IMemberAppService appService = ServiceMap.GetUserAppService(owner.GetType()); IMemberApp app = appService.GetByApp(appType, appInstanceId); return(IsRoleInApp(roleId, app.Id)); }