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

Hardcoded scopes #44

Open
glpatcern opened this issue Aug 31, 2023 · 0 comments
Open

Hardcoded scopes #44

glpatcern opened this issue Aug 31, 2023 · 0 comments
Milestone

Comments

@glpatcern
Copy link
Member

glpatcern commented Aug 31, 2023

RevaController.php includes some hardcoded scopes when returning users (in both owncloud and nextcloud branches):

if ($user) {
// FIXME this hardcoded value represents {"resource_id":{"storage_id":"storage-id","opaque_id":"opaque-id"},"path":"some/file/path.txt"} and is not needed
$result = [
"user" => $this->formatUser($user),
"scopes" => [
"user" => [
"resource" => [
"decoder" => "json",
"value" => "eyJyZXNvdXJjZV9pZCI6eyJzdG9yYWdlX2lkIjoic3RvcmFnZS1pZCIsIm9wYXF1ZV9pZCI6Im9wYXF1ZS1pZCJ9LCJwYXRoIjoic29tZS9maWxlL3BhdGgudHh0In0=",
],
"role" => 1,
],
],
];
return new JSONResponse($result, Http::STATUS_OK);
}

They should be replaced by proper ones.

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

No branches or pull requests

1 participant