- Issue created by @mglaman
- 🇫🇮Finland lauriii Finland
I don't know what's the best way to store this but based on what we have in the designs, I'm anticipating we'd want to get following information:
- Who last changed a page (and when)
- Who created the page (and when)
- Who published the page (and when)
Would the author/user reference provide us what we need to provide this?
- 🇺🇸United States mglaman WI, USA
Technically the revision log gives us all of that information, revision log entries always reference a user.
This issue would enable "edit|delete own" and "edit|delete any" permissions.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
#2 that would require, respectively:
\Drupal\Core\Entity\RevisionLogInterface::getRevisionUser()
+\Drupal\Core\Entity\RevisionLogInterface::getRevisionCreationTime()
\Drupal\user\EntityOwnerInterface
\Drupal\Core\Entity\EntityPublishedInterface
in combination with 1
IOW: @mglaman is right.
Based on that, the new content entity type SHOULD extend
\Drupal\Core\Entity\EditorialContentEntityBase
.WDYT, @mglaman?
- 🇺🇸United States mglaman WI, USA
The MR working on adding the entity type already extends Drupal\Core\Entity\EditorialContentEntityBase, so it'll be covered. But not the idea of "owning" a page like node and media already do
- 🇫🇮Finland lauriii Finland
I think we should go with the standard permission approach we've taken for entity types in core which as pointed out by #3 requires author/user for the entity. The permissions seem a bit more complex than what may be needed but we would have to go through some extensive thinking to deviate from the existing pattern.
- 🇺🇸United States mglaman WI, USA
It also makes the standard way of doing "Who created the page" a lot easier (target default data table vs revisions)
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Based on #5, this already is done in 📌 Create Page entity type Active ? What is then the scope of this issue? 🤔
- 🇺🇸United States mglaman WI, USA
This is not done in that issue. This issue is to implement entity owner interface.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Ahhh! I missed that — I thought it was part of
EditorialContentEntityBase
, but it's not 🙈#3487071 is in now! 🚀
Ideally we'd be able to reuse
EntityOwnerTrait
just likeNode
does. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Haha, magnificently simple! 👏
As far as I'm concerned, this doesn't need any additional tests — why would we re-test what core already has solid test coverage for? That'd be overkill.
This MR just needs to update some test expectations and then it's ready IMHO.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
AFAICT 📌 CI: update to 1.6.3 of the GitLab CI Template Active should make this pass, so merged in
origin/0.x
to get that here too. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Seems like E2E test failures in HEAD are causing this to fail as well, see 📌 Remove leftover wait() in empty canvas e2e test Active .
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Not mergeable until HEAD is green. The failing end-to-end test can AFAICT not possibly be caused by the changes in this MR.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
0.x
is green again, so merged in upstream changes and hoping this will now be green too 😄 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Only
empty-canvas.cy.js
failed in theCypress E2E
CI job. That's a known random failure: 📌 Remove leftover wait() in empty canvas e2e test Active . Going ahead and merging! 🚀 -
wim leers →
committed b7901889 on 0.x authored by
mglaman →
Issue #3487549 by mglaman, wim leers, lauriii: Page should have author/...
-
wim leers →
committed b7901889 on 0.x authored by
mglaman →
Automatically closed - issue fixed for 2 weeks with no activity.