qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1614031 - /qpid/trunk/qpid/cpp/src/qpid/acl/AclValidator.cpp
Date Mon, 28 Jul 2014 13:48:57 GMT
Author: chug
Date: Mon Jul 28 13:48:57 2014
New Revision: 1614031

URL: http://svn.apache.org/r1614031
Log:
QPID-5890: Validation refactoring. Fix Coverity MIXED_ENUM complaint.


Modified:
    qpid/trunk/qpid/cpp/src/qpid/acl/AclValidator.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/acl/AclValidator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/acl/AclValidator.cpp?rev=1614031&r1=1614030&r2=1614031&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/acl/AclValidator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/acl/AclValidator.cpp Mon Jul 28 13:48:57 2014
@@ -452,6 +452,52 @@ namespace acl {
             // Given that the broker will be calling with this property,
             // determine what user rule settings are allowed.
             switch (prop) {
+                // Cases where broker and Acl file share property name and meaning
+                case PROP_NAME:
+                    spm[SPECPROP_NAME]="";
+                    break;
+                case PROP_DURABLE:
+                    spm[SPECPROP_DURABLE]="";
+                    break;
+                case PROP_OWNER:
+                    spm[SPECPROP_OWNER]="";
+                    break;
+                case PROP_ROUTINGKEY:
+                    spm[SPECPROP_ROUTINGKEY]="";
+                    break;
+                case PROP_AUTODELETE:
+                    spm[SPECPROP_AUTODELETE]="";
+                    break;
+                case PROP_EXCLUSIVE:
+                    spm[SPECPROP_EXCLUSIVE]="";
+                    break;
+                case PROP_TYPE:
+                    spm[SPECPROP_TYPE]="";
+                    break;
+                case PROP_ALTERNATE:
+                    spm[SPECPROP_ALTERNATE]="";
+                    break;
+                case PROP_QUEUENAME:
+                    spm[SPECPROP_QUEUENAME]="";
+                    break;
+                case PROP_EXCHANGENAME:
+                    spm[SPECPROP_EXCHANGENAME]="";
+                    break;
+                case PROP_SCHEMAPACKAGE:
+                    spm[SPECPROP_SCHEMAPACKAGE]="";
+                    break;
+                case PROP_SCHEMACLASS:
+                    spm[SPECPROP_SCHEMACLASS]="";
+                    break;
+                case PROP_POLICYTYPE:
+                    spm[SPECPROP_POLICYTYPE]="";
+                    break;
+                case PROP_PAGING:
+                    spm[SPECPROP_PAGING]="";
+                    break;
+                case PROP_HOST:
+                    spm[SPECPROP_HOST]="";
+                    break;
                 // Cases where broker supplies a property but Acl has upper/lower limit for
it
                 case PROP_MAXPAGES:
                     spm[SPECPROP_MAXPAGESLOWERLIMIT]="";
@@ -478,10 +524,8 @@ namespace acl {
                     spm[SPECPROP_MAXFILECOUNTUPPERLIMIT]="";
                     break;
                 default:
-                    // Cases where broker supplies a property and Acl matches it directly
-                    SpecProperty sp = SpecProperty(prop);
-                    spm[ sp ]="";
-                    break;
+                    throw Exception( "acl::RegisterProperties no case for property: " +
+                        AclHelper::getPropertyStr(prop) );
             }
         }
         AclData::Rule someProps(propertyIndex, acl::ALLOW, spm, source, description);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message