Can't save a Site in AuthzGroupService, even though it is an instance of AuthzGroup

Description

If you try and save a Site via AuthzGroupService.save, a ClassCastException is thrown. The problem is in BaseAuthzGroupService, line 603. The code tries to cast the AuthzGroup to a BaseAuthzGroup and this will fail in the case of a Site instance. This breaks the contract and needs sorting. You should just be able to save an AuthzGroup.

Activity

Show:

Neal Caidin August 22, 2016 at 10:46 AM

How to reproduce this issue? Can you provide more information? Are you working on a patch ?

Matthew Buckett August 4, 2016 at 5:37 AM

How much of the Site saving logic would you expect to happen when you saved a site through the AuthzGroupService?

I don't think Site should have really ever extended AuthzGroup but should have composed it, but I'm not sure we'll ever be able to change this.

Details

Priority

Affects versions

Components

Assignee

Reporter

Created August 4, 2016 at 5:03 AM
Updated April 25, 2018 at 3:19 PM