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

Site creation - users can select templates of a site type which they can't create

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.4
    • Fix Version/s: 11.0
    • Component/s: Worksite Setup
    • Labels:
      None

      Description

      Users who don't have permission to create sites of one or more types can still see and select templates of those types during site creation. When they attempt to create a site using the template, they get this error message in the UI:
      Alert: You do not have permission to add the site c2b0517e-ce5c-4152-a5dc-e3fd44fff0f6.

      And this stacktrace is thrown in sakai.log:
      2015-04-06 13:47:24,450 WARN ajp-bio-8009-exec-7 org.sakaiproject.site.tool.SiteAction - org.sakaiproject.site.tool.SiteAction@3820779e.addNewSite: You do not have permission to add the site c2b0517e-ce5c-4152-a5dc-e3fd44fff0f6.
      org.sakaiproject.exception.PermissionException: user=67977bab-0b44-47c6-a551-fdb4525fb390 lock=site.add.course resource=/site/c2b0517e-ce5c-4152-a5dc-e3fd44fff0f6 id: /site/c2b0517e-ce5c-4152-a5dc-e3fd44fff0f6
      at org.sakaiproject.site.impl.BaseSiteService.unlock(BaseSiteService.java:190)
      at org.sakaiproject.site.impl.BaseSiteService.addSite(BaseSiteService.java:1278)
      at org.sakaiproject.site.cover.SiteService.addSite(SiteService.java:264)
      at org.sakaiproject.site.tool.SiteAction.addNewSite(SiteAction.java:11489)
      at org.sakaiproject.site.tool.SiteAction.doFinish(SiteAction.java:6339)
      at org.sakaiproject.site.tool.SiteAction.doManual_add_course(SiteAction.java:5373)

      To reproduce:

      • Set up a user type which to not have permissions to create all types of sites (i.e. grant the .auth role in the !user.template.guest site.add.project, but not site.add.course).
      • Create a site template for both project and course site types.
      • Log in as a user of the type described above.
      • Go to Worksite Setup, then New.
      • Check the radio button next to 'Create site from template'.
      • Select the site type that you shouldn't be able to create, and select a template of that type.
      • Attempt to complete course site creation using that template.

      This issue will be resolved when users only see templates for sites of a type which they're allowed to create.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                maintenanceteam Core Team
                Reporter:
                whumphri Will Humphries
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration