public virtual bool CanEditField(IDeferredItem <TItem> item, INamedField <TItem> field)
        {
            Func <IRestUser, bool> authorizePredicate = GetFieldAuthorizePredicate(field.Name);

            if (authorizePredicate != null)
            {
                return(authorizePredicate.Invoke(_stem.User)); // TODO: item
            }
            return(AllowAllChecker.CanEditField(item, field));
        }
        public EngineRestScalar([NotNull] IEngineContext <TItem> context, [NotNull] IDeferredItem <TItem> item, [NotNull] INamedField <TItem> field)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }
            if (field == null)
            {
                throw new ArgumentNullException(nameof(field));
            }

            _context = context;
            _item    = item;
            _field   = field;
        }
Exemple #3
0
 public bool CanEditField(IDeferredItem <Artist> item, INamedField <Artist> field)
 {
     throw new NotImplementedException();
 }
 public bool CanEditField(IDeferredItem <TItem> item, INamedField <TItem> field)
 {
     return(true);
 }
 public EngineRestPoco([NotNull] IEngineContext <TItem> context, [NotNull] IDeferredItem <TItem> item, [NotNull] INamedField <TItem> field) : base(context, item, field)
 {
 }