public override void Define(IPermissionDefinitionContext context)
        {
            PermissionGroupDefinition getGroup = context.GetGroupOrNull("TestGetGroup");

            if (getGroup == null)
            {
                getGroup = context.AddGroup("TestGetGroup");
            }
            PermissionGroupDefinition group = context.AddGroup("TestGroup");

            group.AddPermission("MyAuthorizedService1");

            context.RemoveGroup("TestGetGroup");
        }
        public override void Define(IPermissionDefinitionContext context)
        {
            var getGroup = context.GetGroupOrNull("TestGetGroup");

            if (getGroup == null)
            {
                getGroup = context.AddGroup("TestGetGroup");
            }

            var group = context.AddGroup("TestGroup");

            group.AddPermission("MyAuthorizedService1");

            group.GetPermissionOrNull("MyAuthorizedService1").ShouldNotBeNull();

            context.RemoveGroup("TestGetGroup");
        }
        public override void Define(IPermissionDefinitionContext context)
        {
            var getGroup = context.GetGroupOrNull("TestGetGroup");

            if (getGroup == null)
            {
                getGroup = context.AddGroup("TestGetGroup");
            }

            var group = context.AddGroup("TestGroup");

            group.AddPermission("MyAuthorizedService1");

            group.AddPermission("MyPermission1").AddStateProviders(new TestRequireEditionPermissionStateProvider());
            group.AddPermission("MyPermission2");

            group.GetPermissionOrNull("MyAuthorizedService1").ShouldNotBeNull();

            context.RemoveGroup("TestGetGroup");
        }