Thanks, Andrea for the response.

I just cloned the repo and I was looking at the UserRestController class (
https://github.com/geoserver/geoserver/blob/6e9e25c0c7cdda9ada9f33f8255130d3afc76801/src/restconfig/src/main/java/org/geoserver/rest/security/UsersRestController.java),
it seems to be fine. I will check the test classes (
https://github.com/geoserver/geoserver/blob/cc1db2ce700e387fac99f80953d99fc760c39d5e/src/restconfig/src/test/java/org/geoserver/rest/security/UserRoleRestControllerTest.java#L17
)

Thanks


On Tue, Jan 28, 2020 at 9:03 AM Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> Hi Samy,
> I cannot help with the docs or the usage of the REST, I was not involved
> in setting them up,
> and haven't used them in practice either (users are typically managed
> outside of GeoServer
> in enterprise installs, while for local tests I use the GUI)... but I'd
> suggest looking at the code,
> it might give you a better chance of figuring out how things are supposed
> to work:
>
> https://github.com/geoserver/geoserver/blob/6e9e25c0c7cdda9ada9f33f8255130d3afc76801/src/restconfig/src/main/java/org/geoserver/rest/security/UsersRestController.java
> checking the tests might be valuable too:
>
> https://github.com/geoserver/geoserver/blob/cc1db2ce700e387fac99f80953d99fc760c39d5e/src/restconfig/src/test/java/org/geoserver/rest/security/UserRoleRestControllerTest.java#L17
>
> Cheers
> Andrea
>
>
> On Tue, Jan 28, 2020 at 2:55 PM Samy Otero <sot...@psdrcs.com> wrote:
>
>> Hi all,
>>
>> I am trying to delete a user in the GeoServer using the endpoint provided
>> in the documentation.
>> I found 2 versions of the same endpoint but none of them work. Please
>> check the docs below:
>>  - https://docs.geoserver.org/2.15.x/en/user/rest/api/userrole.html
>> * - *
>> https://docs.geoserver.org/latest/en/api/#/latest/en/api/1.0.0/usergroup.yaml
>>
>> I tried to get a user by its username (following the docs):
>> GET:  */**rest/security/usergroup/user/username*
>> *but it returns the following errors *
>>
>>
>>
>>
>>
>> I can confirm that :
>>
>> *- DELETE: /**rest/security/usergroup/user/username *and  
>> *rest/security/usergroup/users/username
>> *return a 403, even when I am authenticated.
>>
>> - GET:  */**rest/security/usergroup/user/username return a 405 *xmnrrkb
>> <https://manage.psdrcs.com/#/services/egis-client_geo/log/xmnrrkbx2evfct7qypt0hu5dr>
>>
>>         27 Jan 16:22:14 WARN [servlet.PageNotFound] - Request method
>> 'GET' not supported
>> xmnrrkb
>> <https://manage.psdrcs.com/#/services/egis-client_geo/log/xmnrrkbx2evfct7qypt0hu5dr>
>>  27
>> Jan 16:22:14 WARN [annotation.ExceptionHandlerExceptionResolver] - Resolved
>> [org.springframework.web.HttpRequestMethodNotSupportedException: Request
>> method 'GET' not supported]and  and *rest/security/usergroup/users/username
>> *return  404
>>                 xmnrrkb
>> <https://manage.psdrcs.com/#/services/egis-client_geo/log/xmnrrkbx2evfct7qypt0hu5dr>
>>  27
>> Jan 16:23:00 WARN [servlet.PageNotFound] - No mapping for GET
>> /geoserver/rest/security/usergroup/users/samytest
>>
>> Am I doing something wrong? Is this the intended behavior?
>>
>> Regards
>>
>> --
>> Samy Otero
>>
>> *PSD |* Software Developer
>>
>> www.psdrcs.com
>>
>> *London |* 148 Fullarton St. 9th floor.
>>
>> *Burlington |* 5045 South Service Rd.
>>
>>
>>
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to
>> this list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>>
>> If you want to request a feature or an improvement, also see this:
>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>>
>>
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
> --
>
> Regards, Andrea Aime == GeoServer Professional Services from the experts!
> Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
> @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
> Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339
> 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it
> ------------------------------------------------------- *Con riferimento
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
> circostanza inerente alla presente email (il suo contenuto, gli eventuali
> allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
> destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
> errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
> sarei comunque grato se potesse darmene notizia. This email is intended
> only for the person or entity to which it is addressed and may contain
> information that is privileged, confidential or otherwise protected from
> disclosure. We remind that - as provided by European Regulation 2016/679
> “GDPR” - copying, dissemination or use of this e-mail or the information
> herein by anyone other than the intended recipient is prohibited. If you
> have received this email by mistake, please notify us immediately by
> telephone or e-mail.*
>


-- 
Samy Otero

*PSD |* Software Developer

www.psdrcs.com

*London |* 148 Fullarton St. 9th floor.

*Burlington |* 5045 South Service Rd.
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to