feat: add filter permission and group
Supersedes https://github.com/codeigniter4/shield/pull/270
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 @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?
No problem. If someone really wants this feature, they would take over this PR. You don't need to close this.
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.
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.
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)
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:
- generating-a-new-ssh-key
- adding-a-new-ssh-key-to-your-account
- 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
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.
This feature seems to be needed by many, so please feel free to send new PRs based on this PR if anyone can.
@MGatner @datamweb where do we stand on this?
I don't think anyone has claimed it.
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.
Ok. I'll take this one over. It's a great start and a much needed feature.
Superseded by #535