Skip to content

OBGM-514 Make the quartz monitor render properly + add security rules #4420

Merged
awalkowiak merged 5 commits intofeature/upgrade-to-grails-3.3.10from
OBGM-514
Dec 22, 2023
Merged

OBGM-514 Make the quartz monitor render properly + add security rules #4420
awalkowiak merged 5 commits intofeature/upgrade-to-grails-3.3.10from
OBGM-514

Conversation

@kchelstowski
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@alannadolny alannadolny left a comment

Choose a reason for hiding this comment

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

Great finding on the implementation -> compile!

Comment on lines 144 to 149
(superuserActions[controllerName]?.contains("*")
|| superuserControllers?.contains(controllerName)
|| superuserActions[controllerName]?.contains(actionName)
|| superuserActions['*'].any {
actionName?.startsWith(it)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmmm, do we have a styling rule about the placing of the logical operators?
I mean whether we should place them in the way you did, or:

Suggested change
(superuserActions[controllerName]?.contains("*")
|| superuserControllers?.contains(controllerName)
|| superuserActions[controllerName]?.contains(actionName)
|| superuserActions['*'].any {
actionName?.startsWith(it)
})
(superuserActions[controllerName]?.contains("*") ||
superuserControllers?.contains(controllerName) ||
superuserActions[controllerName]?.contains(actionName) ||
superuserActions['*'].any {
actionName?.startsWith(it)
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

According to Java coding conventions, a break should happen before the operator: https://www.oracle.com/java/technologies/javase/codeconventions-indentation.html

I think I've raised this topic recently in one of the PRs, that we should discuss it and document it in our coding conventions.

Comment on lines 147 to 149
|| superuserActions['*'].any {
actionName?.startsWith(it)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
|| superuserActions['*'].any {
actionName?.startsWith(it)
})
|| superuserActions['*'].any(actionName?.startsWith(it))
)

I think we can make it a little more compact without having to use { ... } but it doesn't really matter I am fine with the way it looks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, I have not realized that, because this code has been already there, the only thing I've introduced here is:

superuserActions[controllerName]?.contains("*")

I could change it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@drodzewicz I've applied your suggestion, but in fact, it should not be any(...), but any{...}.

Copy link
Collaborator Author

@kchelstowski kchelstowski Dec 14, 2023

Choose a reason for hiding this comment

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

by saying so I'm starting to strongly agree with @awalkowiak that applying suggestions blindly via github sucks.

@awalkowiak awalkowiak changed the base branch from feature/upgrade-to-grails-3.3.10 to release/0.9.0-RC December 15, 2023 13:08
@awalkowiak awalkowiak changed the base branch from release/0.9.0-RC to release/0.9.0 December 15, 2023 14:51
@awalkowiak awalkowiak added this to the 0.9.1 milestone Dec 18, 2023
@awalkowiak awalkowiak changed the base branch from release/0.9.0 to feature/upgrade-to-grails-3.3.10 December 18, 2023 09:52
Copy link
Member

@jmiranda jmiranda left a comment

Choose a reason for hiding this comment

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

LGTM

@awalkowiak awalkowiak merged commit 1a47128 into feature/upgrade-to-grails-3.3.10 Dec 22, 2023
@awalkowiak awalkowiak deleted the OBGM-514 branch December 22, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants