Exemple #1
0
        public void SetUp()
        {
            TestDbContext.BuildPrivilege("create.sernos");
            TestDbContext.BuildPrivilege("update.oldthing", false);

            TestDbContext.BuildPermission("/employees/1", "update.oldthing");
            TestDbContext.BuildPermission("/employees/1", "create.sernos");

            this.result = this.Sut.GetPrivilegesForMember("/employees/1");
        }
        public void SetUp()
        {
            TestDbContext.BuildPrivilege("create.sernos");
            TestDbContext.BuildPrivilege("update.tariff");
            TestDbContext.BuildPrivilege("update.vatcode");

            TestDbContext.BuildPermission("/employees/1", "create.sernos");
            TestDbContext.BuildPermission("/employees/2", "update.tariff");
            TestDbContext.BuildPermission("/employees/2", "update.vatcode");

            this.result = this.Sut.GetPrivilegesForMember("/employees/1");
        }
Exemple #3
0
        public void SetUp()
        {
            TestDbContext.BuildPrivilege("create.sernos");
            TestDbContext.BuildPrivilege("update.tariff");
            TestDbContext.BuildPrivilege("update.vatcode");

            var subGroup = TestDbContext.BuildGroup("sub", true).BuildGroupMember("/employees/1");
            var group    = TestDbContext.BuildGroup("master", true).BuildGroupMember(subGroup);

            TestDbContext.BuildPermission(group, "create.sernos");
            TestDbContext.BuildPermission(group, "update.tariff");

            this.result = this.Sut.GetPrivilegesForMember("/employees/1");
        }