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

Refactor admin audit app #39192

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

danialRahimy
Copy link
Contributor

@danialRahimy danialRahimy commented Jul 6, 2023

Summary

Refactor admin audit app

TODO

Checklist

@solracsf solracsf added 3. to review Waiting for reviews technical debt labels Jul 6, 2023
@solracsf solracsf added this to the Nextcloud 28 milestone Jul 6, 2023
@danialRahimy
Copy link
Contributor Author

Hey @szaimen

I opened this PR last week, but haven't been assigned to any reviewers yet. Is there anything that I could do?

Thanks.

@szaimen szaimen requested review from blizzz, a team, ArtificialOwl and icewind1991 and removed request for a team July 13, 2023 20:09
@szaimen
Copy link
Contributor

szaimen commented Jul 13, 2023

Thanks for the ping! I requested some reviewers.

@danialRahimy
Copy link
Contributor Author

Dear @szaimen

Would it be necessary for me to take any action in order to proceed with the pull request?

@szaimen
Copy link
Contributor

szaimen commented Aug 16, 2023

@nextcloud/server-backend please review!

apps/admin_audit/lib/AuditLogger.php Outdated Show resolved Hide resolved
IShare::TYPE_REMOTE_GROUP => $this->sharedRemoteGroupType($params),
IShare::TYPE_DECK => $this->sharedDeckType($params),
IShare::TYPE_SCIENCEMESH => $this->sharedSciencemeshType($params),
default => null,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if this one should fail (or at least log) if an unknown type is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before my modifications, if a type didn't match the conditions, no action was taken.
I'm uncertain whether to implement logging or throw a specialized exception to handle unknown types.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, maybe it will ring a bell for someone :)

Copy link
Member

@fsamapoor fsamapoor left a comment

Choose a reason for hiding this comment

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

In my opinion, removing redundant annotations make the code that much cleaner. When a method's parameter is typed, having the exact type hint as an annotation does not add any value to the mix. I think it would be great if you could also review the annotations in this PR.

I would also recommend writing a summary of the changes you have made in your PR's description and explaining briefly how those changes would improve the codebase.

Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

This is only moving things around, and is using match in a weird way.
I’m not sure I get the point.

]
);
}
match ($params['shareType']) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The use of match when the return value is not used is really confusing.

@@ -60,6 +60,7 @@
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IServerContainer;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why? It does not seem used.

danialRahimy and others added 7 commits October 10, 2023 09:40
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
danialRahimy and others added 2 commits October 10, 2023 09:40
Co-authored-by: Benjamin Gaussorgues <github-fa3ie@altahrim.net>
Signed-off-by: danial rahimy <48244647+danialRahimy@users.noreply.github.com>
…and modern syntax.

Signed-off-by: Danial Rahimi <48244647+danialRahimy@users.noreply.github.com>
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
This was referenced Mar 12, 2024
This was referenced Mar 20, 2024
@skjnldsv skjnldsv mentioned this pull request Mar 28, 2024
81 tasks
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants