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

WebUI showing folder multiple times #2101

Closed
nuessgens opened this issue Apr 19, 2024 · 4 comments
Closed

WebUI showing folder multiple times #2101

nuessgens opened this issue Apr 19, 2024 · 4 comments
Labels
bug Bugs & errors found in Reposilite cosmetic Issue is not harmful and affects only cosmatic part of a project

Comments

@nuessgens
Copy link

What happened?

I'm new to reposilite.
I managed to get it running on my quite old (from 2016) Sonology NAS.
No problem due to the lightweight nature of reposilite. Great work! :-)

However: I "think" I found a bug regarding tokens and routes.

I created a token "test1" (non-manager)

 token-generate test1

Than I added "read" permissions to that token for 3 artifacts (group:artifact without version)

route-add test1 /releases/com/g1/a1 r
route-add test1 /releases/com/g1/a2 r
route-add test1 /releases/com/g2/a3 r

Now the display in the UI is quite odd
If logged in with token test1
on Overview there is - as expected - only the repository "releases" visible
https://repo/#/

  • releases

If one navigates into releases
https://repo/#/releases

  • com
  • com
  • com

And in turn for com
https://repo/#/releases/com

  • g1
  • g1
  • g2

I hope the screenshot makes quite clear what I mean
reposilite

I guess this is not intended?! Did I do something wrong on setting app the routes or is this a bug?

Reposilite version

3.x

Relevant log output

com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:36.208 DEBUG | GET /api/auth/me from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:36.240 DEBUG | GET /api/maven/details/ from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:36.242 DEBUG | GET /api/maven/details/ from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.478 DEBUG | GET /api/maven/details/releases from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.485 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to  from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.478 DEBUG | GET /releases/maven-metadata.xml from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.491 DEBUG | ERR RESULT | GET /api/maven/details/releases errored with ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.496 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to maven-metadata.xml from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.500 DEBUG | FIND | Could not find file due to ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.509 DEBUG | GET /api/maven/details/releases from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.516 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to  from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.518 DEBUG | ERR RESULT | GET /api/maven/details/releases errored with ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:14:44.520 DEBUG | GET //maven-metadata.xml from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.581 DEBUG | GET /api/maven/details/releases/com from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.590 DEBUG | GET /releases/com/maven-metadata.xml from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.596 DEBUG | GET /api/maven/details/releases/com from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.603 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to com from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.604 DEBUG | ERR RESULT | GET /api/maven/details/releases/com errored with ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.624 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to com/maven-metadata.xml from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.627 DEBUG | FIND | Could not find file due to ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.628 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to com from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.629 DEBUG | ERR RESULT | GET /api/maven/details/releases/com errored with ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.646 DEBUG | GET /releases/maven-metadata.xml from 127.1.2.3
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.654 DEBUG | ACCESS | Unauthorized attempt of access (token: AccessTokenIdentifier(type=PERSISTENT, value=3)) to maven-metadata.xml from releases
com.reposilite.journalist.slf4j.Slf4jLogger 2024-04-19 19:15:04.657 DEBUG | FIND | Could not find file due to ErrorResponse(status=403, message=You must be the token owner or a manager to access this.)
@nuessgens nuessgens added the bug Bugs & errors found in Reposilite label Apr 19, 2024
@dzikoysk
Copy link
Owner

Hey, interesting. Do you see such issue for public repositories too?

@dzikoysk dzikoysk added the investigation Issue is currently investigeted, e.g. author is trying to reproduce problem label Apr 20, 2024
@nuessgens
Copy link
Author

nuessgens commented Apr 20, 2024

You are right. The releases repository has the visibility PRIVATE.

In case I change the visibility to PUBLIC test1 is not seeing duplicate folders.

FYI in case I set visibility to PRIVATE again an create an additional token like follows

token-generate test2
route-add test2 / rw

If logged in with test2 there are no duplicate folders, too.

The exact version I'm using is reposilite-3.5.10-all.jar (seems I forgot to mention that in the initial issue 🙈)

@dzikoysk
Copy link
Owner

I think I know what might be the issue - for private tokens there's a new implementation of the file tree - technically, the test1 user does not have access to com directory, so normally it wouldn't be able to see it. Lately, to make it a bit more user-friendly, I've added an implementation that simulates these intermediate directions based on user's routes - you'd probably see more of these repos after adding more routes.

It's a bug, but fortunately a cosmetic one, thanks for reporting this :)

@dzikoysk dzikoysk added cosmetic Issue is not harmful and affects only cosmatic part of a project and removed investigation Issue is currently investigeted, e.g. author is trying to reproduce problem labels Apr 20, 2024
@nuessgens
Copy link
Author

Thank you! For your great work and your fast reply 😉

Yes forgot to mention: It's only "odd" in the web UI.
For "downloading" - e.g. building with maven - everything works fine and as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs & errors found in Reposilite cosmetic Issue is not harmful and affects only cosmatic part of a project
Projects
None yet
Development

No branches or pull requests

2 participants