Skip to content

Handle user disabled exception as its own result code#1215

Open
tobiasKaminsky wants to merge 5 commits into
masterfrom
disabled
Open

Handle user disabled exception as its own result code#1215
tobiasKaminsky wants to merge 5 commits into
masterfrom
disabled

Conversation

@tobiasKaminsky

@tobiasKaminsky tobiasKaminsky commented Oct 10, 2023

Copy link
Copy Markdown
Member

If an user account is disabled, previously ResultCode was MAINTENANCE_MODE, now it is USER_DISABLED.
I will create a branch on Files app that is using this.

ZetaTom
ZetaTom previously approved these changes Oct 12, 2023
alperozturk96
alperozturk96 previously approved these changes Nov 10, 2023
alperozturk96
alperozturk96 previously approved these changes Nov 10, 2023
alperozturk96
alperozturk96 previously approved these changes Nov 20, 2023
ZetaTom
ZetaTom previously approved these changes Nov 21, 2023
alperozturk96
alperozturk96 previously approved these changes Dec 4, 2023
@alperozturk96

Copy link
Copy Markdown
Contributor

/rebase

@github-actions

github-actions Bot commented Feb 3, 2024

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2627
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2627
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2627
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2627
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2627
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2627
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

@codecov

codecov Bot commented Jan 14, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...d/lib/common/operations/RemoteOperationResult.java 0.00% 5 Missing ⚠️
...android/lib/common/operations/ExceptionParser.java 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

private static final String INVALID_PATH_EXCEPTION_STRING = "OC\\Connector\\Sabre\\Exception\\InvalidPath";
private static final String INVALID_PATH_EXCEPTION_UPLOAD_STRING = "OCP\\Files\\InvalidPathException";
private static final String VIRUS_EXCEPTION_STRING = "OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType";
private static final String USER_DISABLED_MESSAGE = "OC\\User\\LoginException: Account disabled";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@joshtrichards joshtrichards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we make this more generic (for all LoginException's) we could also maybe cover other scenarios we're apprently not handling well like:

"message": "OC\\User\\LoginException: Password is expired, please use forgot password method to reset" (#8697)

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.

4 participants