Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33702

Stack trace when enabling/disabling a tool that has a functions.require with sets

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.0, 12.0, 19.0
    • Fix Version/s: None
    • Component/s: PageOrderHelper
    • Labels:
      None
    • Test Plan:
      Hide

      The dropbox tool is the only one that uses permission sets, so you could probably test with that tool. However at the moment it's not creating the stacktrace and there might be another problem with the permissions as defined in dropbox.

      It would also be convenient to be able to start using this to solve SAK-33454. We also have some overrides that were using this syntax. So I'd think it could be tested after that is worked on.

      Really what you want to be able to do is enable/disable every tool, including one defined with permission sets.

      Show
      The dropbox tool is the only one that uses permission sets, so you could probably test with that tool. However at the moment it's not creating the stacktrace and there might be another problem with the permissions as defined in dropbox. It would also be convenient to be able to start using this to solve SAK-33454 . We also have some overrides that were using this syntax. So I'd think it could be tested after that is worked on. Really what you want to be able to do is enable/disable every tool, including one defined with permission sets.

      Description

      If you have a configuration that has a functions.require with sets (Which is supported by ToolComponent) there's a stack trace when enabling a tool. For instance changing gradebookNG to the below can reproduce the problem. If this worked it could help to solve SAK-33454.

      The only other place I saw this "used" was in
      signup/tool/src/webapp/WEB-INF/tools/sakai.signup.xml

      But it was commented out there. The best case I'd think is some method return a multidimensional array so the splitting of functions.require is standard everywhere.

      diff --git a/gradebookng/tool/src/webapp/WEB-INF/tools/sakai.gradebookng.xml b/gradebookng/tool/src/webapp/WEB-INF/tools/sakai.gradebookng.xml
      index ee9b265..f4bbd33 100644
      --- a/gradebookng/tool/src/webapp/WEB-INF/tools/sakai.gradebookng.xml
      +++ b/gradebookng/tool/src/webapp/WEB-INF/tools/sakai.gradebookng.xml
      @@ -12,8 +12,9 @@
                      <category name="sakai.admin" />
                      -->
       
      -               <!--  If the visibility/access of this tool should be dependent on a user permission, you can list that here -->
      -               <!--  <configuration name="functions.require" value="some.permission"/> -->
      +               <!--  Require any gradebook persmission (but the user must at least have one of them) -->
      +               <configuration name="functions.require" value="gradebook.editAssignments|gradebook.gradeAll|gradebook.gradeSection|gradebook.viewOwnGrades|gradebook.viewStudentNumbers"/> 
      +        
                      
           </tool>
       </registration>
      

      Here's the stack trace

      06-Dec-2017 18:18:35.325 WARN [http-nio-8080-exec-7] PonderUtilCore.handleLevel1Error Exception rendering view: 
      java.lang.RuntimeException: SqlService.dbWrite failure
      	at org.sakaiproject.db.impl.BasicSqlService.dbWriteCount(BasicSqlService.java:1347)
      	at org.sakaiproject.db.impl.BasicSqlService.dbWriteCount(BasicSqlService.java:1164)
      	at org.sakaiproject.db.impl.BasicSqlService.dbWrite(BasicSqlService.java:1149)
      	at org.sakaiproject.db.impl.BasicSqlService.dbWrite(BasicSqlService.java:1078)
      	at org.sakaiproject.authz.impl.DbAuthzGroupService$DbStorage.save_REALM_RL_FN(DbAuthzGroupService.java:1561)
      	at org.sakaiproject.authz.impl.DbAuthzGroupService$DbStorage.saveTx(DbAuthzGroupService.java:1474)
      	at org.sakaiproject.authz.impl.DbAuthzGroupService$DbStorage$8.run(DbAuthzGroupService.java:1457)
      	at org.sakaiproject.db.impl.BasicSqlService.transact(BasicSqlService.java:338)
      	at org.sakaiproject.authz.impl.DbAuthzGroupService$DbStorage.save(DbAuthzGroupService.java:1453)
      	at org.sakaiproject.authz.impl.BaseAuthzGroupService.completeSave(BaseAuthzGroupService.java:649)
      	at org.sakaiproject.authz.impl.BaseAuthzGroupService.save(BaseAuthzGroupService.java:627)
      	at org.sakaiproject.site.tool.helper.order.impl.SitePageEditHandler.pageVisibilityHelper(SitePageEditHandler.java:641)
      	at org.sakaiproject.site.tool.helper.order.impl.SitePageEditHandler.enablePage(SitePageEditHandler.java:532)
      

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  buckett Matthew Buckett
                  Reporter:
                  jonespm Matthew Jones
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                    Dates

                    Created:
                    Updated:

                      Git Integration