forked from team/site
1
0
Fork 0

Merge branch 'master' of tilde.team:meta/site

This commit is contained in:
Ben Harris 2018-06-12 20:00:06 -04:00
commit 6909ce29e7
7 changed files with 15 additions and 204 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "admin"]
path = admin
url = git@tilde.team:meta/admin-app

1
admin Submodule

@ -0,0 +1 @@
Subproject commit bb4c72fc4dee460ba5d5e59b04c332449a9095fe

View File

@ -1,27 +0,0 @@
<?php
include __DIR__.'/../header.php';
if (empty($_POST["username"]) || empty($_POST["password"])) {
} else {
$usr = urlencode($_POST["username"]);
$pwd = urlencode($_POST["password"]);
$auth = json_decode(file_get_contents("https://auth.tilde.team/?json&user=$usr&pw=$pwd"))->sudoer;
if ($auth) {
echo "you're a sudoer";
} else {
echo "you don't have sudo. go away.";
}
}
?>
<h1>tilde.team admin console</h1>
<form method="post">
<input class="form-control" name="username" type="text">
<input class="form-control" name="password" type="password">
<input class="btn btn-default" type="submit" value="log in">
</form>
<?php
include __DIR__.'/../footer.php';

View File

@ -1,6 +1,5 @@
{
"require": {
"swiftmailer/swiftmailer": "^6.0",
"mnapoli/front-yaml": "^1.6"
}
}

168
composer.lock generated
View File

@ -4,119 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a803137bed2f09c826bb7a26e4d85e03",
"content-hash": "c1f29fb97cdd4614c2983d225e5842cc",
"packages": [
{
"name": "doctrine/lexer",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Lexer\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"lexer",
"parser"
],
"time": "2014-09-09T13:34:57+00:00"
},
{
"name": "egulias/email-validator",
"version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "8790f594151ca6a2010c6218e09d96df67173ad3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3",
"reference": "8790f594151ca6a2010c6218e09d96df67173ad3",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1.0.1",
"php": ">= 5.5"
},
"require-dev": {
"dominicsayers/isemail": "dev-master",
"phpunit/phpunit": "^4.8.35||^5.7||^6.0",
"satooshi/php-coveralls": "^1.0.1"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Egulias\\EmailValidator\\": "EmailValidator"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eduardo Gulias Davis"
}
],
"description": "A library for validating emails against several RFCs",
"homepage": "https://github.com/egulias/EmailValidator",
"keywords": [
"email",
"emailvalidation",
"emailvalidator",
"validation",
"validator"
],
"time": "2018-04-10T10:11:19+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.7.1",
@ -198,61 +87,6 @@
],
"time": "2017-10-29T19:29:55+00:00"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.0.2",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "412333372fb6c8ffb65496a2bbd7321af75733fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc",
"reference": "412333372fb6c8ffb65496a2bbd7321af75733fc",
"shasum": ""
},
"require": {
"egulias/email-validator": "~2.0",
"php": ">=7.0.0"
},
"require-dev": {
"mockery/mockery": "~0.9.1",
"symfony/phpunit-bridge": "~3.3@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.0-dev"
}
},
"autoload": {
"files": [
"lib/swift_required.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Chris Corbyn"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Swiftmailer, free feature-rich PHP mailer",
"homepage": "http://swiftmailer.symfony.com",
"keywords": [
"email",
"mail",
"mailer"
],
"time": "2017-09-30T22:39:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.8.0",

View File

@ -35,11 +35,13 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
if ($message == "") { // no validation errors
$msgbody = "desired username: {$_REQUEST["username"]}
contact email: {$_REQUEST["email"]}
reason: {$_REQUEST["interest"]}
ssh key:
{$_REQUEST["sshkey"]}";
$msgbody = "
desired username: {$_REQUEST["username"]}
contact email: {$_REQUEST["email"]}
reason: {$_REQUEST["interest"]}
ssh key:
{$_REQUEST["sshkey"]}
";
if (mail('sudoers', 'new tilde.team signup', $msgbody, "Reply-To: {$_REQUEST["email"]}")) {
echo '<div class="alert alert-success" role="alert">

View File

@ -19,13 +19,12 @@ sudo adduser newusername
```
use the default password `tilde`
1. respond to their email with their account information
1. su newusername and then copy the ssh key into ~/.ssh/known_hosts
1. click the link in the signup email from the server to open the domain control panel and add their forwarding address if they've opted in
1. respond to their email with their account information (template coming soon), including a reminder to set up their .forward file if desired, and encourge them to hop onto irc/#meta to meet the community
1. profit??
account creation is something that i would like to look into. maybe this can be an admin portal (similar to ~town) that would notify admins when a new signup arrives and prompt them to go to the web interface to approve/deny/respond to the account request.
automated account creation is something that i would like to look into. maybe this can be an admin portal (similar to ~town) that would notify admins when a new signup arrives and prompt them to go to the web interface to approve/deny/respond to the account request.
---