/swish/lib/pep.pl
AllApplicationManualNameSummaryHelp

  • swish
    • lib
      • messages.pl
      • paths.pl -- Setup SWISH search paths
      • config.pl -- Make HTTP locations known to JSON code
      • page.pl -- Provide the SWISH application as Prolog HTML component
      • help.pl -- SWISH help system
      • search.pl -- SWISH search from the navigation bar
      • chat.pl -- The SWISH collaboration backbone
      • storage.pl -- Store files on behalve of web clients
      • gitty.pl -- Single-file GIT like version system
      • gitty_driver_bdb.pl -- Gitty BDB driver
      • gitty_driver_files.pl -- Gitty plain files driver
      • patch.pl -- Run patch program
      • authenticate.pl -- Authentication access for SWISH
      • pep.pl -- SWISH PEP (Policy Enforcement Point)
        • approve/3
        • not_sandboxed/2
        • authorized/2
        • ws_authorized/2
        • approve/2
        • deny/2
      • avatar.pl -- Avatar management
      • noble_avatar.pl -- Noble Avatar generator
      • chatstore.pl -- Store chat messages
      • content_filter.pl -- Ban list content filter
      • include.pl -- Support :- include(File) from SWISH
      • swish_csv.pl -- Support CSV output from a Pengines server
      • examples.pl -- Serve example files
      • md_eval.pl -- Provide evaluable markdown
      • profiles.pl
      • highlight.pl -- Highlight token server
      • markdown.pl -- SWISH Notebook markdown support
      • template_hint.pl -- Generate template hints for CondeMirror
      • render.pl -- SWISH term-rendering support
      • web.pl -- Serve /plugin
      • version.pl -- Manage software versions
      • oauth2.pl -- Oauth2 based login
      • form.pl -- Form handling utilities
      • bootstrap.pl -- Bootstrap form generator
      • session.pl -- Setup SWISH sessions
      • trace.pl --
      • projection.pl -- Define the projection
      • attvar.pl
      • jquery.pl -- Call jQuery on the SWISH interface
      • dashboard.pl -- Provide non-programmer query execution
      • html_output.pl -- SWISH HTML Output
      • swish_debug.pl
      • procps.pl
      • flags.pl
      • swish_chr.pl -- Make CHR available in SWISH
 authorized(+Action, +Options) is det
Verify that Action is authorized. Options:
indentity(+Identity)
Indentity is the identity dict as collected by autenticate.pl.

Actions defined:

  • Gitty store actions
    gitty(download(Obj,Format))
    Attempt to download Obj, one of file(File) or hash(Hash) in Format, see storage_get/4 from storage.pl
    gitty(create(File,Named,Meta))
    Create file name File with the given meta-data. Named is one of named or random and indicates whether the file is named by the user or the name is generated by the system.
    gitty(update(File,PrevMeta,Meta))
    Update File and change meta-data from PrevMeta to Meta.
    gitty(delete(File,Meta))
    Delete File that has the given meta data.
  • File actions
    file(update(File,Meta))
    Update (save) a physical file outside the versioned gitty store.
  • Social options
    chat(open)
    Open websocket chat channel
    chat(post(Message,About))
    Post a chat message about a specific topic
throws
- http_reply(forbidden(URL)) if the action is not allowed. Can we generate a JSON error object?