shield icon indicating copy to clipboard operation
shield copied to clipboard

feat: add filter permission and group

Open jlopes90 opened this issue 3 years ago • 8 comments

Supersedes https://github.com/codeigniter4/shield/pull/270

jlopes90 avatar Aug 19 '22 12:08 jlopes90

Note, we expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. If pull requests are not accompanied by relevant tests, they will likely be closed. https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#contributions

If you are not familiar with PHPUnit testing, See Resources

kenjis avatar Aug 24 '22 00:08 kenjis

@kenjis @datamweb

Sorry, I'm on vacation, I'll be back at the end of the month. So it's better to close the pull request. Otherwise I'll delay a lot of time doing tests (phpunit) or I can't. So someone better make the new this PR and know how to do phpunit.

What you say?

jlopes90 avatar Aug 24 '22 14:08 jlopes90

No problem. If someone really wants this feature, they would take over this PR. You don't need to close this.

kenjis avatar Aug 24 '22 22:08 kenjis

No problem. If someone really wants this feature, they would take over this PR. You don't need to close this.

How does one take over or contribute to an existing PR? I tried checking online but it seems I'll need to have write access to the repository.

Please advise.

sammyskills avatar Sep 29 '22 20:09 sammyskills

Get this PR branch into your local repository, and push it to your GitHub repository. And create your own PR.

If you have gh command:

$ gh pr checkout 393

You can get this add-filter-permission-and-group branch.

kenjis avatar Sep 29 '22 21:09 kenjis

Or with just Git:

git remote add jlopes90 https://github.com/jlopes90/shield.git
git fetch jlopes90

You can then make a new branch starting from the existing one:

git switch -c my-takeover jlopes90/add-filter-permission-and-group

(I'm mobile so please excuse me if I didn't get something quiet right)

MGatner avatar Sep 30 '22 10:09 MGatner

In fact, I always wondered how @kenjis could handle PR created by others. @MGatner Thanks! Now I learned completely. Unfortunately, I received the following error from the mentioned method:

P:\MyGitHubWork\shield>git fetch jlopes90
fatal: unable to access 'https://github.com/jlopes90/shield.git/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443

After a bit of research I found that setting SSH Key can fix the problem. Now it works without any problem. While troubleshooting I read the following:

  1. generating-a-new-ssh-key
  2. adding-a-new-ssh-key-to-your-account
  3. switching-remote-urls-from-https-to-ssh

I like this method, because other people's commits are not removed, and their contributions are recorded in the source. It is beautiful and fair.

P:\MyGitHubWork\shield>git fetch jlopes90
Enter passphrase for key '/c/Users/ppars/.ssh/id_ed50212':
remote: Enumerating objects: 68, done.
remote: Counting objects: 100% (37/37), done.
remote: Total 68 (delta 37), reused 37 (delta 37), pack-reused 31
Unpacking objects: 100% (68/68), 9.05 KiB | 52.00 KiB/s, done.
From github.com:jlopes90/shield
 * [new branch]      add-filter-permission-and-group -> jlopes90/add-filter-permission-and-group
 * [new branch]      develop    -> jlopes90/develop
 * [new branch]      docs       -> jlopes90/docs
 * [new branch]      magic-link-add-link-back-to-login -> jlopes90/magic-link-add-link-back-to-login
 * [new branch]      master     -> jlopes90/master
P:\MyGitHubWork\shield>git switch -c my-takeover jlopes90/add-filter-permission-and-group
Switched to a new branch 'my-takeover'
branch 'my-takeover' set up to track 'jlopes90/add-filter-permission-and-group'.

P:\MyGitHubWork\shield>git status
On branch my-takeover
Your branch is up to date with 'jlopes90/add-filter-permission-and-group'.

nothing to commit, working tree clean

datamweb avatar Sep 30 '22 16:09 datamweb

Yay! Glad it was helpful. Working across remotes and preserving or co-authoring work is complicated but important, and once you do it a few times it starts to feel natural.

MGatner avatar Oct 01 '22 10:10 MGatner

This feature seems to be needed by many, so please feel free to send new PRs based on this PR if anyone can.

kenjis avatar Nov 04 '22 00:11 kenjis

@MGatner @datamweb where do we stand on this?

lonnieezell avatar Nov 15 '22 01:11 lonnieezell

I don't think anyone has claimed it.

MGatner avatar Nov 15 '22 11:11 MGatner

Comment 5: I think it has caused the audience to misunderstand. I have just done a personal practice on Git there. I did not intend to use this PR.

So anyone can continue if they want.

datamweb avatar Nov 15 '22 11:11 datamweb

Ok. I'll take this one over. It's a great start and a much needed feature.

lonnieezell avatar Nov 17 '22 04:11 lonnieezell

Superseded by #535

lonnieezell avatar Dec 12 '22 04:12 lonnieezell