Project

General

Profile

bug #7529

Wrong UUID after creating a GrantedAuthority for a Role like ROLE_PUBLISH

Added by Andreas Kohlbecker over 2 years ago. Updated 16 days ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
07/03/2018
Due date:
% Done:

100%

Severity:
normal
Found in Version:
Tags:

Description

The ROLE_PUBLISH was not yet in the database and thus was created using the Taxeditor GrantedAuthority Create Dialog.

The resulting GrantedAuthority in the database has the wrong uuid:

72 | 2018-07-03 07:29:27 | 0ada8cd5-8cdd-4fc0-a329-59d4d122008a | ROLE_PUBLISH

the Role has a different uuid in the code:

public final static Role ROLE_PUBLISH = new Role(UUID.fromString("9ffa7879-cc67-4592-a14a-b251cccde1a7"), "ROLE_PUBLISH");

Check if the ROLE_PUBLISH is being used in a DB with wrong uuid

I am not sure if this is a taxeditor issue or if the cdmlib methods are missing to handlde this correctly. But first of all we should take a look at the taxeditor.

Associated revisions

Revision b8dd2aa3 (diff)
Added by Andreas Kohlbecker 23 days ago

fix #7529 adding PUBLISH group to FirstDataInserter

Revision 5b133131 (diff)
Added by Andreas Kohlbecker 22 days ago

ref #7529 adding PUBLISH group to FirstDataInserter - handing case when group with same name exists

Revision c5893c96 (diff)
Added by Andreas Kohlbecker 22 days ago

ref #7529 adding PUBLISH group to FirstDataInserter - handing case when group with same name exists

Revision e0f4dbe9 (diff)
Added by Andreas Müller 16 days ago

ref #7529 adapt new ROLE_PUBLISH constant name in cdmlib-app

History

#1 Updated by Andreas Müller about 1 month ago

  • Tags set to fast
  • Description updated (diff)
  • Priority changed from New to Highest
  • Target version changed from Unassigned CDM tickets to Release 5.21

AK, do you still remember the context for this ticket. What did not work, what did you test, which DB was involved?

#2 Updated by Andreas Kohlbecker about 1 month ago

I seem to remember that I created this ticket in turn to an email conversation that the both of us had.
However, I don't remember 100% exactly the situation, but it was like that someone created the ROLE_PUBLISH via the Groups-Details editor, or the like.
In this case a new GrantedAuthotrity with a new UUID is being created. This UUID conflicts with the one which is predefined in the class eu.etaxonomy.cdm.persistence.permission.Role.

So the solution to this would be that what I suggested in the email conversation today:

"Wir sollten eine Default-Gruppe "Publish" einführen, die durch den FirstDataInserter angelegt wird und die die ROLE_PUBLISH als einzige GrantedAuthority enthält. Dadurch befindet sich die Rolle dann auf jeden Fall in jeder Datenbank und kann per Gruppe leicht einem User zugewiesen werden."

#3 Updated by Andreas Kohlbecker about 1 month ago

  • Description updated (diff)

#4 Updated by Andreas Müller about 1 month ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

#5 Updated by Andreas Kohlbecker 23 days ago

  • Target version changed from Release 5.21 to Release 5.20

#6 Updated by Andreas Kohlbecker 23 days ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#7 Updated by Andreas Kohlbecker 22 days ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

verified at some test databases: works as expected.

#8 Updated by Andreas Kohlbecker 21 days ago

  • Category changed from taxeditor to cdmlib

#9 Updated by Andreas Müller 16 days ago

Have you also checked that no ROLE_PUBLISH with wrong UUID exists in existing production DBs? (see ticket description)

#10 Updated by Andreas Kohlbecker 16 days ago

Andreas Müller wrote:

Have you also checked that no ROLE_PUBLISH with wrong UUID exists in existing production DBs? (see ticket description)

Yes of course otherwise I wouldn't have closed the ticket.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)