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

Redirect from where the login was initiated is not working #398

Open
4 tasks done
milanmajchrak opened this issue Nov 20, 2023 · 3 comments
Open
4 tasks done

Redirect from where the login was initiated is not working #398

milanmajchrak opened this issue Nov 20, 2023 · 3 comments

Comments

@milanmajchrak
Copy link
Collaborator

milanmajchrak commented Nov 20, 2023

Problem description

Downloading works, but when the Item is in the collection where the user cannot access the user is redirected to the login page, but from there it is redirected to the login instead of item page.

E.g. the collection Wikitonques Item: Meninet speaking Tigrigna

PR: #404

Test:

  • Try to download some restricted bitstream and you will be redirected to the login page. Choose **local** -> login -> you should be redirected to the downloading page instead of home page.
  • Try to download some restricted bitstream and you will be redirected to the login page. Choose **Shibboleth login** -> login -> you should be redirected to the downloading page instead of home page.
  • Try to access to the some Item which is stored in the Restricted collection (anonymous user cannot access to it) -> you will be redirected to the login page -> choose **local** -> login -> you should be redirected to the Item which is hidden for the Anonymous user. For this test scenario you must find out/update collection for the Item which not allowed to see by ANONYMOUS user.
  • Try to access to the some Item which is stored in the Restricted collection (anonymous user cannot access to it) -> you will be redirected to the login page -> choose Shibboleth login -> login -> you should be redirected to the Item which is hidden for the Anonymous user. For this test scenario you must find out/update collection for the Item which not allowed to see by ANONYMOUS user.
@Paurikova2
Copy link
Collaborator

Paurikova2 commented Dec 7, 2023

Test at https://dspace-dev.ufal.mff.cuni.cz/home:
Step1:Try to download some restricted bitstream and you will be redirected to the login page. Choose local -> login -> you should be redirected to the downloading page instead of home page.

Error1:
I tried to download restricted bitstream as anonymous user. I was redirected to login page. I logged in as User by [email protected] and I got this result. There are missing information in some fields.
image

Error2:
I tried to download restricted bitstream as anonymous user. I was redirected to login page. I logged as Admin by [email protected]. The file was successfully downloaded, but the page forze.
image
After refreshing: (I was already logged in). But when I choosed some option from bar menu, it worked and website has started to be normal.
image

Step2: Try to download some restricted bitstream and you will be redirected to the login page. Choose Shibboleth login -> login -> you should be redirected to the downloading page instead of home page.

  1. After logged in I got message 'This page isn't working'. The bitstream was not downloaded.
    image

Error1:
When I tried to remove Anonymous from default item read access. But not for all collections.
image

Step3: Try to access to the some Item which is stored in the Restricted collection (anonymous user cannot access to it) -> you will be redirected to the login page -> choose local -> login -> you should be redirected to the Item which is hidden for the Anonymous user. For this test scenario you must find out/update collection for the Item which not allowed to see by ANONYMOUS user.

Error1:
Not for all communities.
image

Error2:
I cannot test this point. I tried to test it from the other side. (Anonymous view has no access policy and only some person has access policy.) I created new user. I created new community with new collection. I removed all access policies for Anonymous group. I wanna create new item by restricted using, but I cannot save this item because some error.
When I created Item with the public license in restrected collection, as user without the access policy I could see item, but without the owning collection.
New info: I created new item in collection without access policy for anonymous and as anonymous I really couldn't see this item. I have idea, that maybe the problem is only for items, which were originally created no in restricted collection (that these rectrioctions were added after added the item).

@Paurikova2
Copy link
Collaborator

Paurikova2 commented Dec 7, 2023

Test at http://dev-5.pc:82/home:
Step1:Try to download some restricted bitstream and you will be redirected to the login page. Choose local -> login -> you should be redirected to the downloading page instead of home page.
and
Step2: Try to download some restricted bitstream and you will be redirected to the login page. Choose Shibboleth login -> login -> you should be redirected to the downloading page instead of home page.

Error1:
I was logged in as Anonymus user. I tried to download restricted bitstream and it worked. I didn't need to log in as User or Admin.

@Paurikova2
Copy link
Collaborator

Paurikova2 commented Dec 8, 2023

Test at https://dspace-dev.ufal.mff.cuni.cz/home:
Step3: Try to access to the some Item which is stored in the Restricted collection (anonymous user cannot access to it) -> you will be redirected to the login page -> choose local -> login -> you should be redirected to the Item which is hidden for the Anonymous user. For this test scenario you must find out/update collection for the Item which not allowed to see by ANONYMOUS user.

  1. I created new person by Access Control -> Person
  2. I created new collection. In mark Assign Roles -> Default item read access and Default bitstream read access I pushed the buttons Restrict. In mark `Authorization I added new authorization for created person.
  3. In Access Control -> Person I added created person to group `COLLECTION_[created collection uuid]_ITEM_DEFAULT_READ.
  4. I created item in this collection with public available license.

Result: When you are log in as person, whose is not member of ITEM_DEFAULT_READ group and the items have public available license and these items were created after added restricted use for collection, you cannot see these items. RIGHT
Image

Result: When you create items in collection and after that you will add restricted use for collection, you will see these items without collection despite that you shouldn't have policies! ERROR

Image

Result: When you are member of ITEM_DEFAULT_READ group, but you are not assigned in collection Authorization, you can see items but without collection. (Items were created after added restricted use for collection) ERROR?

Image

Result: When you follow the descripted steps and you are log in, you can see items with collection. (But you don't see items created before added restricted use) RIGHT?

Image

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

2 participants