UserRoleAssignment entityTypeId+entityObjectId now required

this table only stores entity-dependent roles,
independent roles are stored in the JHipster table JHI_USER_AUTHORITY
This commit is contained in:
Michael Hoennig 2019-05-08 10:56:48 +02:00
parent 8ca206e1c0
commit 735f672ea1
4 changed files with 45 additions and 17 deletions

View File

@ -309,6 +309,36 @@ Once everything works again, we can push our new version:
git push
#### 5. General Aftermath
Think about which additional code could be effected by your JDL-changes!
Files which are not at all in the `jhipster-generated` branch, don't show conflicts even though they might need changes.
Here some examples for amendments to be done:
- in `historicization_*.xml`: the columns or their constraints
- `sampledata/*.xml/csv`
If you find more of such general cases, please add them here!
#### 6. Special Aftermath for new
Because we have added quite some functionality, after introducing new entities, there is a lot more to amend.
Here some issues to consider:
- add sample-data for the new entity
- internal (Angular) frontend: add table filters
- internal (Angular) frontend: amend input fields for multiline, if applicable
- internal (Angular) frontend: check if dates are properly formatted
- \*Mapper: add displayLabel for entity itself and parents
- DTOs: add access-right annotations with customized JSON serializer/deserializer
- Validator: implement entity-based validator and call it in the generated service
- external API: add new type to client library
WARNING: This list is most likely incomplete. Pleas add any new found issue!
For many of these issues look for HOWTO-commits in git or HOWTO comments in the source code.
### Generating the Table of Contents for Markdown
This README file contains a table of contents generated by _doctoc_.

View File

@ -31,12 +31,12 @@
<!-- all following columns like in base table, dropping unique constraints -->
<column name="entity_type_id" type="varchar(255)">
<constraints nullable="true" />
<column name="entity_type_id" type="varchar(32)">
<constraints nullable="false" />
</column>
<column name="entity_object_id" type="bigint">
<constraints nullable="true" />
<constraints nullable="false" />
</column>
<column name="assigned_role" type="varchar(255)">

View File

@ -6,20 +6,20 @@
<!-- JHipster generated entity table changesets -->
<include file="config/liquibase/changelog/00000000000000_initial_schema.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152136_added_entity_Customer.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152137_added_entity_Membership.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152138_added_entity_Share.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152139_added_entity_Asset.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152140_added_entity_SepaMandate.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430154711_added_entity_UserRoleAssignment.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105332_added_entity_Customer.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105333_added_entity_Membership.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105334_added_entity_Share.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105335_added_entity_Asset.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105336_added_entity_SepaMandate.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105342_added_entity_UserRoleAssignment.xml" relativeToChangelogFile="false"/>
<!-- jhipster-needle-liquibase-add-changelog - JHipster will add liquibase changelogs here -->
<!-- JHipster generated constraints changesets -->
<include file="config/liquibase/changelog/20190430152137_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152138_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152139_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430152140_added_entity_constraints_SepaMandate.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190430154711_added_entity_constraints_UserRoleAssignment.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105333_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105334_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105335_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105336_added_entity_constraints_SepaMandate.xml" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20190507105342_added_entity_constraints_UserRoleAssignment.xml" relativeToChangelogFile="false"/>
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
<!-- additional changesets, not generated by JHipster -->

View File

@ -42,9 +42,7 @@
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.userRoleAssignment.assignedRole" for="field_assignedRole">Assigned Role</label>
<select class="form-control" name="assignedRole" [(ngModel)]="userRoleAssignment.assignedRole" id="field_assignedRole" required>
<option value="HOSTMASTER">{{'hsadminNgApp.UserRole.HOSTMASTER' | translate}}</option>
<option value="ADMIN">{{'hsadminNgApp.UserRole.ADMIN' | translate}}</option>
<option value="SUPPORTER">{{'hsadminNgApp.UserRole.SUPPORTER' | translate}}</option>
<!-- only list entity-dependent roles here -->
<option value="CONTRACTUAL_CONTACT">{{'hsadminNgApp.UserRole.CONTRACTUAL_CONTACT' | translate}}</option>
<option value="FINANCIAL_CONTACT">{{'hsadminNgApp.UserRole.FINANCIAL_CONTACT' | translate}}</option>
<option value="TECHNICAL_CONTACT">{{'hsadminNgApp.UserRole.TECHNICAL_CONTACT' | translate}}</option>