Skip to content

Commit

Permalink
add user right on blih ripo in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
cchalop1 committed Mar 23, 2020
1 parent 2f7bdb3 commit 508c9b2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ enum Opt {
notes,
/// Display all your modules
modules,
/// Dispaly all repos on blih
///
/// Dispaly all repos on blih
/// <repo_name> for create
repo { repo_name: Option<String> },
/// Set ripo right <repo name> <user> <user_right>
setacl {
repo_name: String,
user: String,
user_right: String,
},
/// enter one token
token { idx: Option<i32> },
}
Expand Down Expand Up @@ -78,6 +84,11 @@ fn start() {
Some(repo_name) => fetch_create_repo(&pass, repo_name),
None => fetch_repos(&pass).print_repos(),
},
Opt::setacl {
repo_name,
user,
user_right,
} => fetch_right_repo(&pass, repo_name, user, user_right),
Opt::token { idx } => match idx {
Some(idx) => println!("{}", idx),
None => fetch_all_token_open(&pass.autologin),
Expand Down

0 comments on commit 508c9b2

Please sign in to comment.