shield icon indicating copy to clipboard operation
shield copied to clipboard

Magic link add link back to login

Open jlopes90 opened this issue 3 years ago • 13 comments

jlopes90 avatar Aug 14 '22 16:08 jlopes90

Because of "feat: add filter permission and group" the branch is develop. I forget a lot of time to create branch.

jlopes90 avatar Aug 14 '22 16:08 jlopes90

This branch has conflicts that must be resolved. Please rebase:

$ git fetch upstream
$ git rebase upstream/develop

Resolve conflict, and git add the file, and

$ git rebase --continue

kenjis avatar Aug 14 '22 21:08 kenjis

imagem

I did something wrong, and it doesn't show upstream.

jlopes90 avatar Aug 15 '22 09:08 jlopes90

imagem

jlopes90 avatar Aug 15 '22 09:08 jlopes90

Run git remove -v.

kenjis avatar Aug 15 '22 09:08 kenjis

imagem

jlopes90 avatar Aug 15 '22 09:08 jlopes90

Sorry, git remote -v.

kenjis avatar Aug 15 '22 09:08 kenjis

imagem

jlopes90 avatar Aug 15 '22 09:08 jlopes90

I think I already solved it, I used git remote add upstream https://github.com/codeigniter4/shield.git -f

jlopes90 avatar Aug 15 '22 09:08 jlopes90

@jlopes90 , I want you to write a unittest for this PR. Writing a test for this PR is very simple. I want you to get familiar with the test and this PR is the best place to start. can help you: https://codeigniter4.github.io/CodeIgniter4/testing/response.html

https://github.com/codeigniter4/shield/blob/c48cb81bd80762e0133d1ba53f50e16ab99c1f6e/tests/Collectors/AuthTest.php#L40-L54 You can write the test in tests/Controllers/MagicLinkTest.php. eg:

 public function testHasLinkBackToLogin(): void
{
// test code
}

Please do your best, and let me know if you can't.

datamweb avatar Aug 15 '22 10:08 datamweb

https://github.com/codeigniter4/shield/pull/375#issuecomment-1214879964

Unfortunately, I tried to figure it out and I still don't understand how things work.

jlopes90 avatar Aug 15 '22 15:08 jlopes90

#375 (comment)

Unfortunately, I tried to figure it out and I still don't understand how things work.

It's okay, you'll learn it eventually. In fact, this test is not important for this PR. Look here, it will help you a lot.

datamweb avatar Aug 15 '22 16:08 datamweb

@jlopes90, change it:

 </form>
   <p class="text-center"><a href="<?= url_to('login') ?>"><?= lang('Auth.backToLogin') ?></a></p>

datamweb avatar Aug 15 '22 16:08 datamweb

oops, wrong duplicate commits

jlopes90 avatar Aug 19 '22 10:08 jlopes90

I don't know why you committed the duplicate commits.

Please don't use git merge on the PR branch. See the workflow: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md

kenjis avatar Aug 19 '22 11:08 kenjis