svn commit: r674754 - /lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: jann
Date: Tue Jul  8 02:51:14 2008
New Revision: 674754

URL: http://svn.apache.org/viewvc?rev=674754&view=rev
Log:
One more obsolete AttributeTranslator Reference

Modified:
    lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js

Modified: lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js?rev=674754&r1=674753&r2=674754&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js Tue Jul  8 02:51:14 2008
@@ -204,9 +204,6 @@
 
         var valid = false;
         
-        var translator = cocoon.getComponent("org.apache.lenya.ac.saml.AttributeTranslator");
-        var attributeNames = translator.getSupportedResultNames();
-        
         while (true) {
             cocoon.sendPageAndWait("groups/profile.xml", {
                 "page-title" : "Add Group",
@@ -216,7 +213,7 @@
                 "description" : description,
                 "messages" : messages,
                 "new-group" : true,
-                "attribute-names" : attributeNames
+                "attributes" : attributeSet
             });
             
             if (cocoon.request.getParameter("cancel")) {
@@ -240,8 +237,7 @@
                       rule = null;
                    }
                    if (rule != null) {
-                      var evaluator = groupManager.getAttributeRuleEvaluator();
-                      var result = evaluator.validate(rule);
+                      var result = evaluator.validate(rule, attributeSet);
                       valid = result.succeeded();
                       if (!valid) {
                           var validationMessages = result.getMessages();
@@ -255,7 +251,10 @@
                    group.setItemManager(groupManager);
                    group.setName(name);
                    group.setDescription(description);
-                   if (valid) group.setRule(rule);
+                   if (valid) { 
+                     var ruleObj = new Packages.org.apache.lenya.ac.attr.impl.AttributeRuleImpl(rule, attributeSet, evaluator);
+                     group.setRule(ruleObj);
+		   }
                    group.save();
                    groupManager.add(group);
                    break;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.