Skip to content

OSL ‐ Permissions And Configurations

Mistium edited this page Apr 17, 2024 · 5 revisions

Permissions List:

IMPORTANT! PERMISSIONS ARE CASE SENSITIVE

  • account : allows the use of account networking commands

    • network "login"
    • network "update"
    • network "logout"
    • network "new_account"
    • network "myself"
    • network "ping"
    • network "remove_myself"
    • network "my_files_usage"
    • network "get_my_accounts"
  • Javascript : allows the app to run javascript

    • "js code".eval
    • eval "js code"
  • Permission Editor : allows the app to give other apps permissions

    • permission "give"
  • terminal : Allows the app to run terminal commands

    • terminal "command"
  • File Viewer : Allows apps to open files from identifiers and uuids (as long as they dont require higher access levels)

    • file "open"
  • File Editor : Allows apps to open and edit files

    • file "set"
  • File Admin : Gives full unrestricted access to the files system (bad idea to give programs you don't trust, this permission)

Permissions Commands:

  1. permission "request" permission-name:

    • This command asks the user for a specific permission, indicated by "permission-name."
  2. permission "give" permission-name application-name:

    • Allows the current application to grant another application a specific permission.
    • This action typically requires the "permission editor" permission to be granted to the current application.

Get the application permissions using the permissions variable


Configuration Commands:

  1. config key-name assign-data:

    • Sets the key "key-name" to the value "assign-data" in the application's config.json file.
    • This command is used to configure settings or store data specific to the application.
  2. variable "config" is set to the application's config.json file:

    • This sets a variable named "config" to reference the application's config.json file. It allows the application to read and manipulate its configuration data.
  3. var = config.key(key-name):

    • Retrieves the value associated with the specified "key-name" from the application's config.json file and stores it in the variable "var."
    • This allows the application to access and use configuration data as needed.

These commands enable applications in the originOS environment to manage permissions, request user consent for specific actions, and configure application settings using JSON-based configuration files. The ability to read and write configuration data allows applications to maintain user preferences and state information.