Beispiel #1
0
 public ProfilesAclRightListViewModel(AclRight right) : base(c => c
                                                             .StaticFilter(e => e.AclRightId == right.Id)
                                                             .Column("Name")
                                                             .Header("{Name}")
                                                             .Content(s => s.Profile.Name)
                                                             )
 {
     OpenAction = target => Erp.Docs.OpenDocumentAsync(target.Profile);
 }
Beispiel #2
0
        private void AddRight(AclRight right)
        {
            if (right == null)
            {
                return;
            }
            if (ProfileRights.List.Any(p => p.AclRightId == right.Id))
            {
                return;
            }

            var up = _data.Add <AclRightProfile>(u =>
            {
                u.Profile  = Model;
                u.AclRight = right;
            });

            if (up != null)
            {
                ProfileRights.List.Update();
            }
        }
Beispiel #3
0
 public override bool IsGranted(AclRight right, object grantedTo = null, object grantedOn = null)
 {
     return(true);
 }