Skip to content

Commit ea37efe

Browse files
committed
managed by email prevent example email addition
1 parent c9e1698 commit ea37efe

File tree

4 files changed

+79
-28
lines changed

4 files changed

+79
-28
lines changed

README.md

Lines changed: 56 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ Phoenix Code AI Control provides system administrators and users with tools to m
1717
- Administrative access for system-wide installation
1818
- Phoenix Code Desktop or Browser version
1919

20-
### Desktop Installation Scripts
20+
### Installing Configuration Scripts
21+
22+
Configure AI controls by running the appropriate script for your platform:
23+
24+
> **Note:** The following scripts configure system-wide settings and do not require Phoenix Code to be installed on the administrator's machine.
2125
2226
Download and run the appropriate script for your platform:
2327

@@ -29,21 +33,30 @@ Download and run the appropriate script for your platform:
2933

3034
1. Download the Windows script
3135
2. Right-click and select "Run as administrator"
32-
3. Follow the on-screen prompts
36+
3. Execute with required parameters, for example:
37+
```
38+
setup_phoenix_ai_control_win.bat --managedByEmail [email protected] --disableAI
39+
```
3340

3441
#### macOS Installation
3542

3643
1. Download the macOS script
3744
2. Open Terminal and navigate to your download location
3845
3. Run: `chmod +x setup_phoenix_ai_control_mac.sh`
39-
4. Execute: `sudo ./setup_phoenix_ai_control_mac.sh`
46+
4. Execute with required parameters:
47+
```
48+
sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected] --disableAI
49+
```
4050

4151
#### Linux Installation
4252

4353
1. Download the Linux script
4454
2. Open Terminal and navigate to your download location
4555
3. Run: `chmod +x setup_phoenix_ai_control_linux.sh`
46-
4. Execute: `sudo ./setup_phoenix_ai_control_linux.sh`
56+
4. Execute with required parameters:
57+
```
58+
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected] --disableAI
59+
```
4760

4861
## Installation Script CLI Options
4962

@@ -60,15 +73,17 @@ All installation scripts support the same command-line options:
6073

6174
```bash
6275
# Enable AI with administrative contact
63-
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail admin@example.com
76+
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail school.admin@example.edu
6477

6578
# Enable AI for specific users only
6679
sudo ./setup_phoenix_ai_control_linux.sh --allowedUsers alice,bob --disableAI
6780

6881
# Complete setup with all options
69-
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail admin@example.com --allowedUsers alice,bob --disableAI
82+
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail school.admin@example.edu --allowedUsers alice,bob --disableAI
7083
```
7184

85+
> **Note:** Always replace `[email protected]` with an actual administrator email address. The scripts will detect and reject placeholder email addresses.
86+
7287
### Configuration File Locations
7388

7489
The scripts create configuration files in the following system-wide locations:
@@ -81,7 +96,17 @@ These files are created with read-only permissions for regular users and can onl
8196

8297
## Verifying AI Control Status
8398

84-
### In Desktop App
99+
To verify the status of AI controls on end-user machines, the Phoenix Code AI Control extension must be installed:
100+
101+
### Installing the Extension
102+
103+
1. Open Phoenix Code
104+
2. Navigate to File → Extension Manager
105+
3. Search for "Phoenix Code AI Control"
106+
4. Click the Install button
107+
5. Restart Phoenix Code when prompted
108+
109+
### Checking Status in Desktop App
85110

86111
1. Open Phoenix Code
87112
2. Navigate to File → Check AI Control Status
@@ -92,34 +117,36 @@ These files are created with read-only permissions for regular users and can onl
92117
- Managed by (administrative contact)
93118
- List of allowed users (if configured)
94119

95-
### In Browser Version
120+
### Checking Status in Browser Version
96121

97122
1. Open Phoenix Code in your web browser
98-
2. Navigate to File → Check AI Control Status
99-
3. The browser will check if `ai.phcode.dev` is accessible:
123+
2. Install the extension (File → Extension Manager → "Phoenix Code AI Control")
124+
3. Navigate to File → Check AI Control Status
125+
4. The browser will check if `ai.phcode.dev` is accessible:
100126
- First shows "Checking if AI is disabled..."
101127
- Then displays whether AI is available or blocked
102128
- Provides information on firewall configuration
103129

104130
## Configuration Options
105131

106-
### Network Blocking (Recommended for Schools)
132+
### Desktop Applications (Recommended Method)
107133

108-
The simplest way to disable AI functionality is to block access to:
109-
- `ai.phcode.dev`
134+
For desktop installations of Phoenix Code, we strongly recommend using the installation scripts described above. This approach provides:
110135

111-
Add this domain to your firewall or content filtering system. The browser version of Phoenix Code will automatically detect if the domain is unreachable.
136+
1. System-wide configuration via protected config files
137+
2. Granular control with user-level permissions
138+
3. Ability to selectively enable AI for specific users
112139

113-
### User-Level Control (Desktop Only)
140+
Only administrative users can modify this configuration.
114141

115-
For more granular control on desktop installations:
142+
### Network Blocking (For Browser Version at https://phcode.dev)
116143

117-
1. The installation scripts create a configuration file at a system-wide location
118-
2. This file contains:
119-
- `disableAI`: Boolean flag to control global AI access
120-
- `managedByEmail`: Optional administrative contact
121-
- `allowedUsers`: Optional array of usernames with AI access
122-
3. Only administrative users can modify this configuration
144+
For schools using the browser version of Phoenix Code, network-level blocking is the recommended approach:
145+
146+
1. Block access to: `ai.phcode.dev`
147+
2. Add this domain to your firewall or content filtering system
148+
149+
The browser version of Phoenix Code will automatically detect if the domain is unreachable and display appropriate status messages.
123150

124151
## FAQ
125152

@@ -131,11 +158,6 @@ In both the desktop and browser versions, go to File → Check AI Control Status
131158

132159
Yes, but only in the desktop version. Use the `--allowedUsers` parameter with a comma-separated list of usernames when running the installation script. These users will be able to access AI features even when disabled system-wide with the `--disableAI` flag.
133160

134-
### What's the difference between browser and desktop control?
135-
136-
- **Browser Control**: Limited to network-level blocking of `ai.phcode.dev`
137-
- **Desktop Control**: Supports both network blocking and fine-grained user permissions through the configuration file
138-
139161
### Is AI control mandatory?
140162

141163
No, AI control is optional and meant for educational institutions or enterprises that need to regulate AI usage. By default, all users have access to AI features.
@@ -148,9 +170,15 @@ No, all other features of Phoenix Code will continue to work normally. Only the
148170

149171
Simply run the installation script again with the new parameters. The script will overwrite the existing configuration file with your new settings.
150172

173+
### What's the difference between browser and desktop control?
174+
175+
- **Browser Version**: Only supports network-level blocking of `ai.phcode.dev` through your firewall
176+
- **Desktop Version**: Provides comprehensive control through configuration files with user-specific permissions
177+
151178
### Does this completely prevent AI usage?
152179

153-
For the desktop version, the control is comprehensive when properly configured. For the browser version, you must implement network-level blocking of the `ai.phcode.dev` domain to effectively control access.
180+
- **Desktop Version**: Yes, the control is comprehensive when properly configured using the installation scripts
181+
- **Browser Version**: Only if you implement network-level blocking of the `ai.phcode.dev` domain
154182

155183
### How can I verify that the firewall is properly blocking AI access?
156184

install_scripts/setup_phoenix_ai_control_linux.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ while [[ $# -gt 0 ]]; do
5959
;;
6060
--managedByEmail)
6161
managedByEmail="$2"
62+
# Check if email is the placeholder or empty
63+
if [[ "$managedByEmail" == "[email protected]" || -z "$managedByEmail" ]]; then
64+
echo "Error: Please enter a valid admin email address."
65+
echo "[email protected] is only meant as an example!"
66+
exit 1
67+
fi
6268
shift 2
6369
;;
6470
--allowedUsers)

install_scripts/setup_phoenix_ai_control_mac.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ while [[ $# -gt 0 ]]; do
5959
;;
6060
--managedByEmail)
6161
managedByEmail="$2"
62+
# Check if email is the placeholder or empty
63+
if [[ "$managedByEmail" == "[email protected]" || -z "$managedByEmail" ]]; then
64+
echo "Error: Please enter a valid admin email address."
65+
echo "[email protected] is only meant as an example!"
66+
exit 1
67+
fi
6268
shift 2
6369
;;
6470
--allowedUsers)

install_scripts/setup_phoenix_ai_control_win.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ if "%~1"=="" goto :continue
2323
if "%~1"=="--managedByEmail" (
2424
shift
2525
set "managedByEmail=%~1"
26+
:: Check if email is the placeholder or empty
27+
if "%managedByEmail%"=="[email protected]" (
28+
echo Error: Please enter a valid admin email address.
29+
echo [email protected] is only meant as an example!
30+
exit /b 1
31+
)
32+
if "%managedByEmail%"=="" (
33+
echo Error: Email address cannot be empty.
34+
echo Example: --managedByEmail [email protected]
35+
exit /b 1
36+
)
2637
shift
2738
goto :parse_args
2839
)

0 commit comments

Comments
 (0)