feat(app): PC control permissions (three levels, registered people only)
permissions::decide gives allow, ask or refuse for an action on the PC: only people in pcControl.allowedUsers may ask (nobody by default), viewing is automatic and clicking, typing and running ask first by default, and payments, passwords, deleting files and administrator rights are never done. A PC 제어 screen edits the levels and shows the chat channels' send and delete switches beside them. The PC control tool (M7) will use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ pub enum Screen {
|
||||
Collect,
|
||||
Game,
|
||||
Schedule,
|
||||
PcControl,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize)]
|
||||
@@ -66,6 +67,9 @@ fn f(path: &'static str, screen: Screen, kind: Kind, default: Value, label: &'st
|
||||
Field { path, screen, kind, default, label }
|
||||
}
|
||||
|
||||
/// The levels of a PC control action (`settings::Level`).
|
||||
const LEVELS: &[&str] = &["auto", "ask", "never"];
|
||||
|
||||
/// Every key the screens edit, in screen order.
|
||||
pub fn fields() -> Vec<Field> {
|
||||
use Kind::*;
|
||||
@@ -135,6 +139,12 @@ pub fn fields() -> Vec<Field> {
|
||||
// Schedules (admin.spec.md, "Schedules").
|
||||
f("schedule.chatChannel", Schedule, Id, Value::Null,
|
||||
"음성으로 맡긴 알림을 그 사람이 음성 채널에 없을 때 보낼 채팅 채널(등록한 채널)"),
|
||||
// PC control permissions (admin.spec.md, "PC control permissions").
|
||||
f("pcControl.allowedUsers", PcControl, IdList, json!([]), "PC 제어를 시킬 수 있는 사람(디스코드 사용자 ID)"),
|
||||
f("pcControl.view", PcControl, Choice { values: LEVELS }, json!("auto"), "화면 보기, 창 목록"),
|
||||
f("pcControl.click", PcControl, Choice { values: LEVELS }, json!("ask"), "누르기(버튼, 메뉴, 화면의 한 점)"),
|
||||
f("pcControl.type", PcControl, Choice { values: LEVELS }, json!("ask"), "글자·키 입력"),
|
||||
f("pcControl.run", PcControl, Choice { values: LEVELS }, json!("ask"), "프로그램 실행"),
|
||||
// Game detection (admin.spec.md, "Game detection").
|
||||
f("game.detect", Game, Bool, json!(true), "게임 감지"),
|
||||
f("game.games", Game, TextList { max_items: 100, nullable: false }, json!([]), "게임으로 볼 프로그램(파일 이름, 예: MyGame.exe)"),
|
||||
|
||||
Reference in New Issue
Block a user