task #7099
closed
Make CdmAuthority a persistable class
Added by Andreas Müller over 6 years ago.
Updated over 2 years ago.
Description
We need a persistable Authority base class which will then be extended by classes Role and CdmAuthority. It will replace the existing GrantedAuthorityImpl.
We need the following fields for CdmAuthority:
- permissionClass (hibernate user type for the enum required)
- property (String)
- operation (hibernate user type for enumSet required)
- targetUuid
NOTE: first read #7100 which extends this model change
For Role we only need:
- role (String, or if Role becomes an enum, => enum user type)
https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/WorkshopRightsAndRoles2017-11
- Copied from feature request #3133: security: preparation and first steps for Role, CdmAuthority and GrantedAuthorityImpl implement GrantedAuthority added
- Related to task #7100: Split CdmAuthority into operations and filters added
- Description updated (diff)
- Priority changed from New to Highest
- Target version changed from CDM UML 5.0 to CDM UML 5.5
- Priority changed from Highest to Priority14
- Target version changed from CDM UML 5.5 to CDM UML 5.15
- Status changed from New to In Progress
- Priority changed from Priority14 to Highest
- Target version changed from CDM UML 5.15 to CDM UML 5.8
- Description updated (diff)
- Related to task #7089: Rights and Roles Workshop 2017-11 added
- Status changed from In Progress to Resolved
- Assignee changed from Andreas Müller to Andreas Kohlbecker
This is implemented for now. Old GrantedAuthorities still exist and are in use but we could easily switch to new ones once they are tested. Hopefully the existing Parser works for migrating them.
I have not yet considered the ideas from #7100. This should be done in a next step.
forgot to implement uniqueness. Moved to #8464
- Precedes bug #8473: Migrate from GrantedAuthoritiesImpl to CdmAuthority and Role added
- Status changed from Resolved to Feedback
- % Done changed from 0 to 90
the implementation looks good, I only got three opens points:
- Documentation is missing, I think only linking to this ticket is not neough
- implement toString() method
- implement equals() method
These tasks of course can be handled in a follow up ticket.
- Tracker changed from bug to task
- Status changed from Feedback to Resolved
I added some javadoc. Please extend if you remember more details.
I implemented a first toString() method. Can be adapted later if needed.
I implemented an isEqual() method. Equals itself is defined in CdmBase and should not be overriden as CdmAuthority is a model class and for model classes per se equality is defined by uuid.equals(otherUuid).
Please review, and if it ticket can be closed please close also the full milestone.
- Status changed from Resolved to Closed
- Assignee changed from Andreas Kohlbecker to Andreas Müller
- % Done changed from 90 to 100
two more lines of doc and closing this ticket
Also available in: Atom
PDF