Closed moisbo closed 2 years ago
Hi @moisbo I presume this happens on a migrated record, or does it affect UI-created record as well?
Thanks Shilo, Both.
When updating a recently migrated record and when creating a new record. The interesting thing is that when saving the record no view/edit info is saved. Only values are admin/admin
Hi @moisbo I cannot replicate this on my vanilla "backend-refactor" installation. From your sample record snippet, it seems the local 'admin' user is overwriting the authorization block? I've used the local 'admin' user to overwrite both local researcher-created DMP and a AAF researcher-created DMP, and in both instances, the records' authorization block weren't overwritten, the original user's username is still in the "view" and "edit" arrays.
Can you please provide more context and steps to replicate this issue? More is better, also a few questions:
Thanks!
I think I've found the issue... The assignPermissions functions used in recordtype is caput 😄 in branch backend-refactor. This is using AAF
recordtype using pre-save hook sails.services.rdmpservice.assignPermissions
0|redbox-p | 2021-02-03 14:30 +11:00: debug: [
0|redbox-p | {
0|redbox-p | function: 'sails.services.rdmpservice.assignPermissions',
0|redbox-p | options: {
0|redbox-p | emailProperty: 'email',
0|redbox-p | editContributorProperties: [Array],
0|redbox-p | viewContributorProperties: [Array]
0|redbox-p | }
0|redbox-p | }
0|redbox-p | ]
When a user saves a record. The permissions on mongo are scraped Example (text edited)
Before:
After: