Hi Bill,

Yes, those GET requests are your UI attempting to check your permissions on the 
backend.

The one you sent has a "uri" equal to your "Site object", and a 
"feature=isCollectionAdmin".  That means it's attempting to check if you have 
Collection Admin rights on any​ Collection in the entire site.  Since it looks 
to be returning "totalElements: 0" that means the backend thinks you are not​ a 
Collection Admin on any Collection.  If you had this permission, that 
"totalElements" would be greater than zero.

Your result from the HAL browser is more accurate (returns "totalElements: 1" 
instead), and you should​ see the same result from the UI and HAL Browser if 
everything is setup properly.

So, this implies to me that something may be wrong with your setup.  My guess 
is that for some reason the backend doesn't "believe" you are 
authenticated...or it isn't trusting​ your frontend in some way.

You should look very closely at the "Network" tab of your browser's DevTools 
when you login and especially after​ you have just logged in.  You shouldn't 
see any red, error responses from the backend...but my best guess is you likely 
will see something odd there.  Again, here's how to look for errors on the 
frontend: 
https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)

I'd venture to guess you might be hitting an installation/upgrade error, it 
might even be one of these common installation issues: 
https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues
  (Usually these are caused by a misconfiguration between the frontend & 
backend)

If none of that helps...check all your backend logs very closely and look for 
ERROR messages there.  Something seems "off", and it sounds to me like your 
Backend is either not trusting the frontend, or your Backend is silently 
erroring out every time you try to login.

Tim



________________________________
From: 'Bill Tantzen' via DSpace Technical Support <[email protected]>
Sent: Tuesday, February 8, 2022 3:31 PM
To: DSpace Technical Support <[email protected]>
Subject: Re: [dspace-tech] administrator actions in 7.2

Sorry, forgot to copy the list.

In the apache logs, I see a number of GETs that look like:

/server/api/authz/authorizations/search/object?uri=https://udc-prd.lib.umn.edu/server/api/core/sites/0175ee52-5642-4302-89a1-99c444e5bd2c&feature=isCollectionAdmin&embed=feature

Is this what you are referring to?  With different features like 
isCommunityAdmin, etc.  Likely the stuff I am looking for.  All of them result 
in a code 200; no errors.

The same urls in the HAL browser result in:

{
  "_embedded": {
    "authorizations": [
      {
        "id": 
"e12c38cf-c5eb-4174-871c-3ce124d3889b_isCollectionAdmin_core.site_0175ee52-5642-4302-89a1-99c444e5bd2c",
        "type": "authorization",
        "_links": {
          "eperson": {
            "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/authorizations/e12c38cf-c5eb-4174-871c-3ce124d3889b_isCollectionAdmin_core.site_0175ee52-5642-4302-89a1-99c444e5bd2c/eperson";
          },
          "feature": {
            "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/authorizations/e12c38cf-c5eb-4174-871c-3ce124d3889b_isCollectionAdmin_core.site_0175ee52-5642-4302-89a1-99c444e5bd2c/feature";
          },
          "object": {
            "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/authorizations/e12c38cf-c5eb-4174-871c-3ce124d3889b_isCollectionAdmin_core.site_0175ee52-5642-4302-89a1-99c444e5bd2c/object";
          },
          "self": {
            "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/authorizations/e12c38cf-c5eb-4174-871c-3ce124d3889b_isCollectionAdmin_core.site_0175ee52-5642-4302-89a1-99c444e5bd2c";
          }
        },
        "_embedded": {
          "feature": {
            "id": "isCollectionAdmin",
            "description": "It can be used to verify if the current user is 
admin of any collection in the site",
            "type": "feature",
            "resourcetypes": [
              "core.site"
            ],
            "_links": {
              "self": {
                "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/features/isCollectionAdmin";
              }
            }
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/authorizations/search/object?uri=https://udc-prd.lib.umn.edu/server/api/core/sites/0175ee52-5642-4302-89a1-99c444e5bd2c&feature=isCollectionAdmin";
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}

Again, no errors
Does this look right?

Yep, I'm on 7.2 on both ends!!

~~Bill

On Tue, Feb 8, 2022 at 3:18 PM Bill Tantzen 
<[email protected]<mailto:[email protected]>> wrote:
In the apache logs, I see a number of GETs that look like:

/server/api/authz/authorizations/search/object?uri=https://udc-prd.lib.umn.edu/server/api/core/sites/0175ee52-5642-4302-89a1-99c444e5bd2c&feature=isCollectionAdmin&embed=feature

Is this what you are referring to?  With different features like 
isCommunityAdmin, etc.  Likely the stuff I am looking for.  All of them result 
in a code 200; no errors.

The same urls in the HAL browser result in:

{
  "_links": {
    "self": {
      "href": 
"https://udc-prd.lib.umn.edu/server/api/authz/authorizations/search/object?uri=https://udc-prd.lib.umn.edu/server/api/core/sites/0175ee52-5642-4302-89a1-99c444e5bd2c&feature=isCollectionAdmin";
    }
  },
  "page": {
    "size": 20,
    "totalElements": 0,
    "totalPages": 0,
    "number": 0
  }
}

Again, no errors (but no results either)
Does this look right?

Yep, I'm on 7.2 on both ends!!

~~Bill


On Tue, Feb 8, 2022 at 3:11 PM Tim Donohue 
<[email protected]<mailto:[email protected]>> wrote:
Good luck!

It's definitely not a configuration issue...this area of the code is not 
configurable.  It's either got to be an error causing it, or the data sent to 
the frontend from the backend is incorrect (make sure your backend is also 
running 7.2 obviously, as both frontend & backend should be on the same 
version.)

Let us know what you find (on the list please, so that if others hit this, they 
can figure out what worked for you)

Tim
________________________________
From: Bill Tantzen <[email protected]<mailto:[email protected]>>
Sent: Tuesday, February 8, 2022 2:50 PM
To: Tim Donohue <[email protected]<mailto:[email protected]>>
Subject: Re: [dspace-tech] administrator actions in 7.2

Oh no, I'm sure it's not a code issue;  I was thinking it was a new 
configuration setup.  I'll check the logs and see if there is any help there.  
This worked fine in 7.0 and 7.1 (as well as the demo site), and I'm for sure a 
member of the Administrator group, so it's a little weird!
~~Bill

On Tue, Feb 8, 2022 at 2:47 PM Tim Donohue 
<[email protected]<mailto:[email protected]>> wrote:
Hi Bill,

Those side menus should be checking which groups you are a member of 
automatically (by querying the backend/REST API when you login). They are coded 
to do so in the AdminSidebar component, starting around here: 
https://github.com/DSpace/dspace-angular/blob/main/src/app/admin/admin-sidebar/admin-sidebar.component.ts#L133

If you look at each of the sections, they are coded to detect if you are a 
SiteAdmin (i.e. in "Administrator" group), or a Community or Collection admin 
(of any community/collection), and based on your permissions, it'll show 
appropriate menus.  So, for a SiteAdmin, all menus should be displayed.

I doubt​ it's that code that's to blame...as this is the first time I've heard 
of this behavior & it seems to work fine on 
demo7.dspace.org<http://demo7.dspace.org>.  You may want to look around more 
closely at your logs (in case any error is occurring), and even look at whether 
the UI is throwing a client-side error...see this guide for finding UI errors 
in your browser's DevTools: 
https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)

My best guess is there's some sort of error occurring that's causing this 
behavior... either that, or something with your Administrator group or user 
account has gotten messed up.

Tim


________________________________
From: 'Bill Tantzen' via DSpace Technical Support 
<[email protected]<mailto:[email protected]>>
Sent: Tuesday, February 8, 2022 1:00 PM
To: DSpace Technical Support 
<[email protected]<mailto:[email protected]>>
Subject: [dspace-tech] administrator actions in 7.2

Configuration question I guess.

I am a member of the Administrators group.  However when I log in, most of the 
administrator actions on the sidebar are not available to me (for instance, 
create a community/collection, access control, administer workflow etc).  The 
only options available are create an item, and import/export metadata.  All 
those actions are available to me upon login in our current version, 5.10.

Can you point me to where this is configured in 7.2? Or better yet to the 
documentation (if it exists yet)?
Thanks a million,
~~Bill

--
Human wheels spin round and round
While the clock keeps the pace... -- John Mellencamp
________________________________________________________________
Bill Tantzen    University of Minnesota Libraries
612-626-9949 (U of M)    612-325-1777 (cell)

--
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CADgrb7G2-TszXbDAHjeYo3bQbUQ2HQYOf_x%3DzGxRLKX6rdBHiQ%40mail.gmail.com<https://groups.google.com/d/msgid/dspace-tech/CADgrb7G2-TszXbDAHjeYo3bQbUQ2HQYOf_x%3DzGxRLKX6rdBHiQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.


--
Human wheels spin round and round
While the clock keeps the pace... -- John Mellencamp
________________________________________________________________
Bill Tantzen    University of Minnesota Libraries
612-626-9949 (U of M)    612-325-1777 (cell)


--
Human wheels spin round and round
While the clock keeps the pace... -- John Mellencamp
________________________________________________________________
Bill Tantzen    University of Minnesota Libraries
612-626-9949 (U of M)    612-325-1777 (cell)


--
Human wheels spin round and round
While the clock keeps the pace... -- John Mellencamp
________________________________________________________________
Bill Tantzen    University of Minnesota Libraries
612-626-9949 (U of M)    612-325-1777 (cell)

--
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CADgrb7E0NvgjFiBxNiHVHJf%2B7Zbx6MKCL37pGqhbRiZk9AfEBw%40mail.gmail.com<https://groups.google.com/d/msgid/dspace-tech/CADgrb7E0NvgjFiBxNiHVHJf%2B7Zbx6MKCL37pGqhbRiZk9AfEBw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CY4PR2201MB11437A8BDE3CA1262F439646ED2D9%40CY4PR2201MB1143.namprd22.prod.outlook.com.

Reply via email to