agents get a per-agent repo limit in their permissions record, orgs are locked
max_repos (default 0, 0..=100) lives in the agent's agent-permissions record and is edited on its permissions panel. The controller applies each agent's own value as max_repo_creation at CreateForgeUser and to existing accounts on change, restart and every five minutes; agent accounts may not create organizations.
This commit is contained in:
parent
dc0d08b7fb
commit
1edeb5c55d
1 changed files with 763 additions and 58 deletions
|
|
@ -591,7 +591,7 @@ mod tests {
|
|||
#[test]
|
||||
fn an_agent_called_hive_x_is_not_hive_xs_account() {
|
||||
// Both ways round: the hive job refuses the agent's account, and the
|
||||
// agent's own guard (`disable_repo_creation`) refuses the hive's,
|
||||
// agent's own guard (`limit_agent_account`) refuses the hive's,
|
||||
// because neither accepts the other's email.
|
||||
let login = forge::hive_login("alpha");
|
||||
for agents in [
|
||||
|
|
@ -638,7 +638,7 @@ mod tests {
|
|||
)
|
||||
.await;
|
||||
client
|
||||
.ensure_agent_user("hive-alpha")
|
||||
.ensure_agent_user("hive-alpha", 0)
|
||||
.await
|
||||
.expect_err("the hive's account is not the agent's");
|
||||
assert!(lockdown_patch(&seen, "hive-alpha").is_none());
|
||||
|
|
|
|||
Loading…
Reference in a new issue