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

Add missing roles checks #1739

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Add missing roles checks #1739

merged 1 commit into from
Oct 20, 2020

Conversation

ghys
Copy link
Member

@ghys ghys commented Oct 19, 2020

(I included these fixes in #1735 but extracted them in a stanalone
PR because it's easier to review and a little more urgent.)

As a result of the refactoring in #1713, the operations annotated with
@RolesAllowed containing Role.USER are not anymore automatically
considered accessible to all users, regardless of their actual roles.

4 operations are therefore now denied to admins if they only have the
Role.ADMIN role, as the first admininistrator is created only with
that role the UI encounters unexpected access denied errors and breaks.
(See openhab/openhab-webui#422).

Closes openhab/openhab-webui#422.

Signed-off-by: Yannick Schaus github@schaus.net

(I included these fixes in openhab#1735 but extracted them in a stanalone
PR because it's easier to review and a little more urgent.)

As a result of the refactoring in openhab#1713, the operations annotated with
`@RolesAllowed` containing `Role.USER` are not anymore automatically
considered accessible to all users, regardless of their actual roles.

4 operations are therefore now denied to admins if they only have the
`Role.ADMIN` role, as the first admininistrator is created only with
that role the UI encounters unexpected access denied errors and breaks.
(See openhab/openhab-webui#422).

Closes openhab/openhab-webui#422.

Signed-off-by: Yannick Schaus <github@schaus.net>
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kaikreuzer kaikreuzer merged commit d262b6f into openhab:master Oct 20, 2020
@kaikreuzer kaikreuzer added this to the 3.0.0.M2 milestone Nov 2, 2020
@kaikreuzer kaikreuzer added the bug An unexpected problem or unintended behavior of the Core label Nov 2, 2020
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
(I included these fixes in openhab#1735 but extracted them in a stanalone
PR because it's easier to review and a little more urgent.)

As a result of the refactoring in openhab#1713, the operations annotated with
`@RolesAllowed` containing `Role.USER` are not anymore automatically
considered accessible to all users, regardless of their actual roles.

4 operations are therefore now denied to admins if they only have the
`Role.ADMIN` role, as the first admininistrator is created only with
that role the UI encounters unexpected access denied errors and breaks.
(See openhab/openhab-webui#422).

Closes openhab/openhab-webui#422.

Signed-off-by: Yannick Schaus <github@schaus.net>
GitOrigin-RevId: d262b6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MainUI] Display of thing channels no more happening
2 participants