Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/worthmine/yaml-username-ban
https://github.com/worthmine/yaml-username-ban
user-management yaml
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/worthmine/yaml-username-ban
- Owner: worthmine
- Created: 2016-10-20T09:08:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-19T07:38:02.000Z (about 8 years ago)
- Last Synced: 2023-02-27T15:33:35.012Z (almost 2 years ago)
- Topics: user-management, yaml
- Size: 1.95 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YAML-username-ban
## in perl
```
use YAML::XS qw( LoadFile );
use Plack::Request;my $req = Plack::Request->new($env);
my %param = %{ $req->body_parameters };my $y = LoadFile( './common/static/ban.yaml' );
my @ban = @{ $y->{'ban'} };
die 'そのユニークユーザーIDはシステムにより予約されています。 username=' . $param{'username'}
if $param{'username'} and grep{ lc( $param{'username'} ) eq lc($_) } @ban;
```