Uploaded image for project: 'Kernel'
  1. Kernel
  2. KNL-1430

copyright alert inconsistency between BaseContentService.java and Resources tool

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.0
    • Fix Version/s: 12.0 [Tentative]
    • Component/s: Impl
    • Labels:
    • 11 status:
      Merge

      Description

      BaseContentService.java uses the following function to determine whether the copyright alert is on for given resource:

      protected boolean requiresCopyrightAgreement()

      { // check my properties return m_properties.getProperty(ResourceProperties.PROP_COPYRIGHT_ALERT) != null; }

      Note it checks for no-null value. So if the property value is set to be "false", the above logic will still set the copyright alert on for this resource

      On the other hand, the ResourcesItem.java inside the Content module set copyright alert to be true ONLY when the above property value is not null AND equals to "true":

      public ResourcesItem(ContentEntity entity)
      {
      ResourceProperties props = entity.getProperties();
      .....
      String crAlert = props.getProperty(ResourceProperties.PROP_COPYRIGHT_ALERT);
      if(crAlert != null && Boolean.TRUE.toString().equalsIgnoreCase(crAlert))

      { this.copyrightAlert = true; }

      else

      { this.copyrightAlert = false; }

      ...
      }

      We had instances of resource files that do not show "copyright alert" icon in the Resource UI, but when user tries to access its content, Sakai shows the copyright alert page for it.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                k1team KERNEL TEAM
                Reporter:
                zqian Zhen Qian
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code