parent
1aaacf8ef9
commit
1351816935
@ -0,0 +1,5 @@ |
|||||||
|
ScriptForm auth example |
||||||
|
======================= |
||||||
|
|
||||||
|
This example shows how to authenticate users. Everyone must authenticate. Only |
||||||
|
user 'test2' is allowed to see and execute the 'only_some_users' form. |
@ -0,0 +1,26 @@ |
|||||||
|
{ |
||||||
|
"title": "Authorization protected", |
||||||
|
"users": { |
||||||
|
"test": "secret", |
||||||
|
"test2": "password" |
||||||
|
}, |
||||||
|
"forms": { |
||||||
|
"do_nothing": { |
||||||
|
"title": "Test form", |
||||||
|
"description": "You should only see this if you've entered the correct password", |
||||||
|
"submit_title": "Do nothing", |
||||||
|
"script": "job_do_nothing.sh", |
||||||
|
"fields": [ |
||||||
|
] |
||||||
|
}, |
||||||
|
"only_some_users": { |
||||||
|
"title": "Only some users", |
||||||
|
"description": "You should only see this if you're user 'test2'", |
||||||
|
"submit_title": "Do nothing", |
||||||
|
"script": "job_do_nothing.sh", |
||||||
|
"allowed_users": ["test2"], |
||||||
|
"fields": [ |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,3 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
echo "I did nothing very successfully" |
Loading…
Reference in new issue