django-ninja icon indicating copy to clipboard operation
django-ninja copied to clipboard

Distinguish between AuthenticationError and AuthorizationError

Open c4ffein opened this issue 1 year ago • 1 comments
trafficstars

Implements #1218

c4ffein avatar Aug 06 '24 21:08 c4ffein

As far as I'm concerned, this looks good, thx

lordi avatar Aug 15 '24 17:08 lordi

Can we merge this soon? I also think it looks good and I need this distinction as well since I currently use django-ninja.

BlaiseMuhirwa avatar Nov 15 '24 23:11 BlaiseMuhirwa

I think this might be done better...

AuthenticationError, AuthorizationError should be both inherited from HttpError (with corresponding codes and messages)

that way only one default http-error handler is needed (and users should be able to overwrite custom handlers for each class individualy)

vitalik avatar Nov 16 '24 18:11 vitalik

I think this might be done better...

AuthenticationError, AuthorizationError should be both inherited from HttpError (with corresponding codes and messages)

that way only one default http-error handler is needed (and users should be able to overwrite custom handlers for each class individualy)

Didn't want to cause too much changes with this PR, but definitely the way to go

c4ffein avatar Nov 29 '24 11:11 c4ffein

Hi, thanks for the updates. When are you guys expecting these changes? Release 1.3.0 doesn't contain AFAIK? Please, correct me if I am wrong. Thanks!

NikolozCh avatar Mar 09 '25 18:03 NikolozCh

@NikolozCh you may check Django Shinobi, the community fork that is currently maintained The plan is to merge it back if possible, and if we have no news from @vitalik we will still make the framework more community oriented so the current situation doesn’t happen again

c4ffein avatar Mar 09 '25 19:03 c4ffein

Thanks @c4ffein. Django Shinobi worked perfectly well.

NikolozCh avatar Mar 09 '25 22:03 NikolozCh