Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-6315: Added endpoint to load language limitations for content #887

Conversation

ciastektk
Copy link
Contributor

@ciastektk ciastektk commented Aug 29, 2023

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-6315
Bug fix? no
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

Requires: ibexa/core#270

New endpoints

  1. /permission/limitation/language/content-create/<location-id>
  2. /permission/limitation/language/content-edit/{contentInfoId}
  3. /permission/limitation/language/content-read/{contentInfoId}

All endpoints provides language limitation information for given content item. Language data returned by endpoint is array with keys languageCode, name and hasAccess

For content edit and read there are two optional parameters: versionNo and locationId to check languages with access for content item in specific version number and location.  

LimitationResolver

Methods getContentCreateLimitations and getContentUpdateLimitations have been moved from Ibexa\Contracts\AdminUi\Permission\PermissionChecker to make LimitationResolver responsible for providing specific limitation data for content.
To avoid BC brake, moved methods from Ibexa\Contracts\AdminUi\Permission\PermissionChecker have been marked as deprecated.

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

src/bundle/Resources/config/routing.yaml Outdated Show resolved Hide resolved
@ciastektk ciastektk force-pushed the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch 5 times, most recently from 571974c to 580dd22 Compare September 4, 2023 12:33
@ciastektk ciastektk marked this pull request as ready for review September 4, 2023 12:51
@ciastektk ciastektk requested a review from a team September 4, 2023 12:51
@ciastektk ciastektk force-pushed the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch from 7b04473 to f97e950 Compare September 6, 2023 05:50
src/bundle/Resources/config/routing.yaml Outdated Show resolved Hide resolved
phpstan-baseline.neon Outdated Show resolved Hide resolved
src/contracts/Permission/PermissionCheckerInterface.php Outdated Show resolved Hide resolved
src/lib/Permission/LimitationResolver.php Outdated Show resolved Hide resolved
@ciastektk ciastektk requested review from alongosz and a team September 7, 2023 09:46
@lucasOsti lucasOsti mentioned this pull request Sep 14, 2023
2 tasks
@ciastektk ciastektk force-pushed the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch 2 times, most recently from 620d755 to 54bd64c Compare September 14, 2023 14:03
@ciastektk ciastektk requested review from webhdx and a team September 14, 2023 14:03
src/lib/Permission/LimitationResolver.php Outdated Show resolved Hide resolved
@konradoboza konradoboza requested a review from a team September 15, 2023 10:50
@ciastektk ciastektk force-pushed the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch from 8f917a8 to e62b148 Compare September 18, 2023 06:56
src/bundle/Resources/config/routing.yaml Outdated Show resolved Hide resolved
src/bundle/Resources/config/routing.yaml Outdated Show resolved Hide resolved
src/bundle/Resources/config/routing.yaml Outdated Show resolved Hide resolved
src/contracts/Permission/PermissionCheckerInterface.php Outdated Show resolved Hide resolved
@alongosz alongosz requested a review from a team September 18, 2023 11:32
@ciastektk ciastektk force-pushed the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch 3 times, most recently from af4af87 to 3c71d48 Compare September 18, 2023 12:44
@sonarcloud
Copy link

sonarcloud bot commented Sep 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ciastektk ciastektk closed this Oct 23, 2023
@ciastektk ciastektk force-pushed the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch from 3c71d48 to 6accf58 Compare October 23, 2023 07:10
@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ciastektk ciastektk deleted the ibx-6315-added-endpoint-to-load-language-limitation-for-content branch October 23, 2023 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants