If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:storagenasrights rest.lua

From BoxMatrix


BoxMatrix >> Webinterface >> storagenasrights_rest.lua @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

UI-Structure UI-Modules HTML-Files XML-Files Lua-Scripts Javascript Browser SSI-Files SSI-Directives HTML-Text Event-Text Help-Pages CSS-Files Graphics Research

Lua-Script

Goto:   Functions  -  Dependencies   -   Model-Matrix   -   SMW-Browser

Details

storagenasrights_rest.lua is the REST-API Module for managing NAS access permissions.
It is loaded by rest_config.lua and provides the storagenasrights endpoint which is accessible by:

GET  /api/v0/storagenasrights     # get table of directories with rights
POST /api/v0/storagenasrights     # post directories with their authorization

REST-API:

Functions

The function names of scripts often help to understand function blocks (and show gaps in the docs). fw 7.50 functions:

$ grep -e '^function' -e '^local function' /usr/rest_api/storagenasrights_rest.lua

# returns the ressources table for get and post methods.
function storagenasrights_rest.getRestRessources(rootPath)

# Helpfunction for listquery, 
local function parse_rows(qs)

# Create and return multiquery Table with key and value
local function listquery(querystring)

# Read nas directories with authorization.
local function read_dirs()

# Read rights from nas directories for authorizationead rights from boxusers.
local function read_access(dir)

# Read rights from nas directories for authorization
local function hasUserInternetAccess(uid)

# Get table from directories with rights
local function get_storagedirs()

# response.send(dirs) table from directories with rights
# GET /api/v0/storagenasrights
function storagenasrights_rest.get_storagedirs()

# Add rights entry for nas storages.
local function add_entry(current_dir_node, currdir, username, saveset, new_ids)

# Add nas directory for authorization.
local function add_dir(currdir, saveset, new_ids) 

# Get username.
local function getUsername(uid)

# Get nas authorization for nas for user.
local function hasUserNasRights(uid)

# Get  nas access from internet for user.
local function isRightsForInternetValide(access ,uid)

# Checks whether the path value appears more than once.
local function is_double(query, set)

# Checked is path in table a doublet.
local function is_path_doublet(set)

# Sortiert Access nach Aufbau / Verschachtelung des Baums.
local function sortAccess(access)

# Handler function to post directories with his authorization.
# POST /api/v0/storagenasrights
function storagenasrights_rest.save_storagedirs() 

Dependencies

Daily updated index of all dependencies of this script. Last update: 2024-04-18 08:35 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.
If an Object includes itself then this is a file with the same name but another Path and the dependencies are merged.

Relation Typ Object Mod Firmware Info Origin
Accesses uimod boxusers 51 7.39 - 7.90 FritzBox-Users AVM
Accesses uimod storagedirectories 51 7.39 - 7.90 Storage directories and access permissions AVM
Requires lua response.lua 51 7.39 - 7.90 REST-API Response API AVM
Requires lua rest_api_const.lua 51 7.39 - 7.90 REST-API Const Tables AVM
Includes js box.js 51 7.39 - 7.90 TODO AVM
5 dependencies for this script

Model-Matrix

Daily updated index of the presence, path and size of this script for each model. Last update: 2024-04-18 06:18 GMT.
Showing all models using this script. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size/Bytes
FRITZ!Box 4020 7.39 /usr/rest_api 11.6k
FRITZ!Box 4040 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 4050 7.57 /usr/rest_api 11.9k
FRITZ!Box 4060 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 5530 Fiber (main) 7.39 - 7.80 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 5590 Fiber (arm) 7.39 - 7.90 /usr/rest_api 11.6k - 12.2k
FRITZ!Box 5590 Fiber (prx) 7.70 - 7.90 /usr/rest_api 11.9k - 12.2k
FRITZ!Box 5690 Pro (arm) 7.59 /usr/rest_api 11.9k
FRITZ!Box 6430 Cable (arm) 7.57 /usr/rest_api 11.9k
FRITZ!Box 6490 Cable (arm) 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6490 Cable (atom) 7.39 - 7.51 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6590 Cable (arm) 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6590 Cable (atom) 7.39 - 7.51 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6591 Cable (arm) 7.39 - 7.57 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 6591 Cable (atom) 7.39 - 7.57 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 6660 Cable (arm) 7.39 - 7.57 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 6660 Cable (atom) 7.39 - 7.57 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 6670 Cable (arm) 7.57 - 7.62 /usr/rest_api 11.9k
FRITZ!Box 6670 Cable (atom) 7.61 - 7.62 /usr/rest_api 11.9k
FRITZ!Box 6690 Cable (arm) 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6690 Cable (atom) 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6820 LTE v1 7.39 - 7.51 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6820 LTE v2 7.39 - 7.51 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6820 LTE v3 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6840 LTE 7.39 /usr/rest_api 11.6k
FRITZ!Box 6850 LTE 7.39 - 7.58 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6850 5G 7.39 - 7.51 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 6890 LTE 7.39 - 7.51 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 6890 LTE v1 7.39 - 7.51 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 6890 LTE v2 7.39 - 7.51 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 7272 7.39 /usr/rest_api 11.6k
FRITZ!Box 7430 7.39 /usr/rest_api 11.6k
FRITZ!Box 7490 (main) 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 7510 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 7520 7.39 - 7.51 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 7520 v2 (arm) 7.39 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 7530 7.39 - 7.56 /usr/rest_api 10.8k - 11.9k
FRITZ!Box 7530 AX 7.39 - 7.90 /usr/rest_api 11.6k - 12.2k
FRITZ!Box 7560 7.39 /usr/rest_api 11.6k
FRITZ!Box 7583 7.50 - 7.57 /usr/rest_api 11.6k - 11.9k
FRITZ!Box 7590 7.39 - 7.90 /usr/rest_api 10.8k - 12.2k
FRITZ!Box 7590 AX 7.39 - 7.90 /usr/rest_api 10.8k - 12.2k
FRITZ!Box 7690 7.59 /usr/rest_api 11.9k
FRITZ!Repeater 600 7.39 /usr/rest_api 11.6k
FRITZ!Repeater 1200 7.39 /usr/rest_api 11.6k
FRITZ!WLAN Repeater 1750E 7.39 /usr/rest_api 11.6k
FRITZ!Repeater 2400 7.39 /usr/rest_api 11.6k - 11.7k
FRITZ!Repeater 3000 7.39 /usr/rest_api 11.6k
FRITZ!Repeater 3000 AX 7.39 /usr/rest_api 11.6k
FRITZ!Powerline 1240 AX 7.51 - 7.57 /usr/rest_api 11.9k
FRITZ!Powerline 1260E 7.39 /usr/rest_api 11.6k
51 models use this script

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

s