Current filter:
                                You should refresh the page.
                                  • Hello,
                                    i've changed to securitystrategycomplex. Now i can't manage my custom permissions anymore, since the role window only shows the new permission types.
                                    In pre-11.2 versions, i could create and modify these permissions, but now they are invisible. They don't show up in the Permissions list either as a Security permission.

                                    using System;  
                                    using System.Security;  
                                    using DevExpress.ExpressApp.DC;  
                                    using DevExpress.ExpressApp.Utils;  
                                    using DevExpress.ExpressApp.Security;  
                                    using System.Runtime.Serialization;  
                                    namespace DevExpress.ExpressApp.Security {  
                                    	public enum ProjectManagementModifier { Geen, EigenOfToegewezenProjecten, AlleProjecten }  
                                    	public class ProjectManagementPermission : PermissionBase {  
                                    		private static bool alwaysGranted;  
                                    		private ProjectManagementModifier modifier;  
                                    		public ProjectManagementPermission() : base() { }  
                                    		public ProjectManagementPermission(ProjectManagementModifier modifier)  
                                    			: this() {  
                                    			this.modifier = modifier;  
                                    		public ProjectManagementPermission(SerializationInfo information, StreamingContext context)  
                                    			: base(information, context) { }  
                                    		public override IPermission Copy() {  
                                    			return new ProjectManagementPermission(modifier);  
                                    		public override IPermission Intersect(IPermission target) {  
                                    			IPermission result = null;  
                                    			ProjectManagementPermission ProjectManagerPermission = target as ProjectManagementPermission;  
                                    			if(ProjectManagerPermission == null) {  
                                    				throw new ArgumentException(  
                                    					string.Format("Incorrect permission is passed: '{0}' instead of '{1}'",  
                                    					target.GetType(), GetType()));  
                                    			if(alwaysGranted) {  
                                    				result = new ProjectManagementPermission(ProjectManagementModifier.Geen);  
                                    			else if(ProjectManagerPermission.modifier == modifier) {  
                                    				result = new ProjectManagementPermission(modifier);  
                                    			return result;  
                                    		public override IPermission Union(IPermission target) {  
                                    			IPermission result = Intersect(target);  
                                    			if(result == null) {  
                                    				result = new ProjectManagementPermission(ProjectManagementModifier.Geen);  
                                    			return result;  
                                    		public override void FromXml(SecurityElement e) {  
                                    			modifier = (ProjectManagementModifier)Enum.Parse(typeof(ProjectManagementModifier), e.Attributes["modifier"].ToString());  
                                    		public override string ToString() {  
                                    			EnumDescriptor enumDescriptor = new EnumDescriptor(typeof(ProjectManagementModifier));  
                                    			return CaptionHelper.GetClassCaption(GetType().FullName) + " (" + enumDescriptor.GetCaption(Modifier) + ")";  
                                    		public override SecurityElement ToXml() {  
                                    			SecurityElement result = base.ToXml();  
                                    			result.AddAttribute("modifier", modifier.ToString());  
                                    			return result;  
                                    		public override bool IsSubsetOf(IPermission target) {  
                                    			return Intersect(target) != null;  
                                    		public ProjectManagementModifier Modifier {  
                                    			get { return modifier; }  
                                    			set { modifier = value; }  
                                    		public static bool AlwaysGranted {  
                                    			get { return alwaysGranted; }  
                                    			set { alwaysGranted = value; }  

                                    Any idea?
                                    Kind regards,

                                • Constantine P (DevExpress) 12.07.2011

                                  Hello Willem,
                                  The new security system is not compatible with old-style permissions.
                                  You'll need to rewrite your custom permission according to the new security model.
                                  Custom permission should implement the IOperationPermission interface or inherit from the OperationPermissionBase class.
                                  You'll also need to create several simple classes to support your custom permission:
                                  - The PermissionData descendant to store your permission in a database
                                  - The IPermissionRequestProcessor interface implementor or the PermissionRequestProcessorBase class descendant that will process permission requests for your permission.
                                  - The IPermissionRequest interface implementor or the OperationPermissionRequestBase class descendant. This custom request will be processed by the custom request processor.
                                  I have attached a sample where I implemented these classes for ProjectManagementPermission.
                                  The custom request processor should be registered by calling the PermissionRequestProcessorRepository.Register method. The request processors repository instance can be accessed through the SecurityStrategy.RequestProcessors property.
                                  If you want to manage your custom permissions in the UI in some specific way (as we do with TypeOperationPermission, MemberOperationPermission, and ObjectOperationPermission), you will need to create a custom role class that will contain the list of permission descriptors for your custom permission. Otherwise, you can edit permission data directly using the PersistentPermissions collection of the role ( it is hidden in the UI by default).

                                0 Solutions

                                Creation Date Importance Sort by