PermissionManager icon indicating copy to clipboard operation
PermissionManager copied to clipboard

Use authentication column

Open AbbyJanke opened this issue 5 years ago • 2 comments

This is for issue #213 creates a new field and column allowing for custom authentication column. Also adds that necessary requirement for it.

Note: Email is still a required field. I can't think of any apps that don't really use an email for something.

Screen Shot 2020-05-16 at 11 39 46 PM

Screen Shot 2020-05-16 at 11 39 59 PM

  • Non-Breaking Change
  • Tested it on a live product and fresh install.

AbbyJanke avatar May 17 '20 06:05 AbbyJanke

Hello @AbbyJanke hope you are doing fine 👍

I have this issue on my back to close 4.1 board, I know it's old but anyway, if you re-call what this does is:

  • If autentication column is different than email, it adds the column/the field and setup a new field validation

But it still requires email.

I half agree with you that most apps use email even if it's not used as auth column, but I think that people that does not use email as auth column, the email column might not be required.

@tabacitu i'd like to close this, what you think it's the best approach ?

  • Setup email as required
  • Setup email as not required
  • Don't setup email if auth column is not email

Let me know, Pedro

pxpm avatar Oct 20 '20 13:10 pxpm

I'd agree with you @pxpm . Here's the way I see it:

  • if somebody changed the auth column from email to something else, that something else is probably username; like... in 99% of the cases;
  • to be able to correctly edit that user, you'd still need to edit that username column; which is great, this PR does that;
  • we have NO IDEA if the email column exists; so we should either:
    • (a) check if the email column is present, and only add a field for it then; (also needs this change in the FormRequest)
    • (b) assume the email column is gone;

I think the best way to proceed would be with option (a), basically on top of this PR:

  • [ ] check if email column exists before adding a field for it;
  • [ ] check if email column exists before making it required inside the FormRequest;

In any case, I believe this will make it a breaking change. So when we merge this we should bump the package version and provide an upgrade guide in README.md, just to be safe.

tabacitu avatar Oct 28 '20 13:10 tabacitu

Hey @AbbyJanke - long time no see. I do agree with doing this, but since nobody actually asked for this in so long... I think it's safe to just close it, to be honest.

If more people say they need it, let's do it 💪 I've outlined how I see this coming along above.

Sorry to take so long Abby. Haven't heard from you in a while either, hope you're good.

Cheers!

tabacitu avatar Oct 11 '23 12:10 tabacitu