Compare commits

...

2 Commits

4 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ links.db
launch.json launch.json
settings.json settings.json
links.session.sql links.session.sql
sqltemplates

View File

@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
keywords = ["url", "link", "webpage", "actix", "web"] keywords = ["url", "link", "webpage", "actix", "web"]
categories = ["web-programming", "network-programming", "web-programming::http-server", "command-line-utilities"] categories = ["web-programming", "network-programming", "web-programming::http-server", "command-line-utilities"]
readme = "README.md" readme = "README.md"
repository = "https://git.teilgedanken.de/dietrich/Pslink" repository = "https://github.com/enaut/pslink/"
build = "build.rs" build = "build.rs"

View File

@ -2,6 +2,8 @@
The target audience of this tool are small entities that need a url shortener. The shortened urls can be publicly resolved but only registered users can create short urls. Every registered user can see all shorted urls but ownly modify its own. Admin users can invite other accounts and edit everything that can be edited (also urls created by other accounts). The target audience of this tool are small entities that need a url shortener. The shortened urls can be publicly resolved but only registered users can create short urls. Every registered user can see all shorted urls but ownly modify its own. Admin users can invite other accounts and edit everything that can be edited (also urls created by other accounts).
So in general this is more a shared short url bookmark webpage than a shorturl service.
![Screenshot](./doc/img/pslinkscreenshot.png) ![Screenshot](./doc/img/pslinkscreenshot.png)
The Page comes with a basic commandline interface to setup the environment. If it is built with `cargo build release --target=x86_64-unknown-linux-musl` everything is embedded and it should be portable to any 64bit linux system. The Page comes with a basic commandline interface to setup the environment. If it is built with `cargo build release --target=x86_64-unknown-linux-musl` everything is embedded and it should be portable to any 64bit linux system.

View File

@ -157,7 +157,6 @@ pub(crate) async fn get_user(
if let Ok(uid) = user_id.parse::<i64>() { if let Ok(uid) = user_id.parse::<i64>() {
slog_info!(server_config.log, "Getting user {}", uid); slog_info!(server_config.log, "Getting user {}", uid);
let auth = authenticate(id, server_config).await?; let auth = authenticate(id, server_config).await?;
slog_info!(server_config.log, "{:?}", &auth);
if auth.admin_or_self(uid) { if auth.admin_or_self(uid) {
match auth { match auth {
Role::Admin { user } | Role::Regular { user } => { Role::Admin { user } | Role::Regular { user } => {