jack-ullery / AppAnvil

Graphical user interface for the AppArmor security module (in-progress)
GNU General Public License v3.0
14 stars 12 forks source link

Save manually edited profile #74

Closed jack-ullery closed 9 months ago

jack-ullery commented 9 months ago

This change allows the user to manually edit, parse, and apply changes to a Profile, by using the "Profile Text" section on the "Profile Modify" page. They can do this by pressing the "Parse" button which will appear if there were any manual changes entered into the text area. Afterwards, they much select "Apply" to save and apply the modified profile to the system (like they would if changing the profile through another screen).

This two-step process might be a little unintuitive, but it was the best solution I could come up with given technical constraints. The main problem I had was: when should changes made in this editor be parsed? Should I reparse them continuously every time a key is pressed (maybe waiting for a timeout), or should I allow the user to manually choose? If I choose the former approach, then changes might be deleted (or not saved) if the user accidentally makes a syntax error when writing the profile. Even though the latter approach introduces more friction, it should hopefully be more transparent to the experienced user.