Example #1
0
 public IEnumerable <ProjectFieldDropdownValue> GetPossibleValues(
     AccessArguments modelAccessArguments)
 {
     return(OrderedValueCache.Value.Where(v =>
                                          SelectedIds.Contains(v.ProjectFieldDropdownValueId) ||
                                          (v.IsActive && (v.PlayerSelectable || modelAccessArguments.MasterAccess))
                                          ));
 }
Example #2
0
 public bool HasEditAccess(AccessArguments accessArguments)
 {
     return(accessArguments.MasterAccess
            ||
            (accessArguments.PlayerAccessToCharacter && Field.CanPlayerEdit &&
             Field.FieldBoundTo == FieldBoundTo.Character)
            ||
            (accessArguments.PlayerAccesToClaim && Field.CanPlayerEdit &&
             (Field.ShowOnUnApprovedClaims || accessArguments.PlayerAccessToCharacter)));
 }
Example #3
0
 public bool HasViewAccess(AccessArguments accessArguments)
 {
     return(Field.IsPublic ||
            accessArguments.MasterAccess
            ||
            (accessArguments.PlayerAccessToCharacter && Field.CanPlayerView &&
             Field.FieldBoundTo == FieldBoundTo.Character)
            ||
            (accessArguments.PlayerAccesToClaim && Field.CanPlayerView &&
             Field.FieldBoundTo == FieldBoundTo.Claim));
 }