Isaac Connor
110e5075f4
fix namespace fixes #3566
2019-04-01 17:21:01 -04:00
Isaac Connor
fa9803d819
Can't use this->data to avoid another db hit. Must load by id
2019-04-01 10:11:56 -04:00
Isaac Connor
b988ce0573
more parentheses to make logic more clear
2019-03-20 14:26:35 -04:00
Isaac Connor
520c41da23
Merge ../ZoneMinder.connortechnology.bad into storageareas
2019-03-18 14:40:03 -04:00
Matthew Noorenberghe
abb6ef1688
API: Escape 'named' params for SQLi in two more Event endpoints.
...
Fixes #2099
2019-03-11 00:21:51 -07:00
Matthew Noorenberghe
056b96f7fc
API: Monitor and Event 'index' SQLi. Fixes #2099
2019-03-11 00:21:51 -07:00
Isaac Connor
af9c87a112
Merge branch 'master' into storageareas
2019-02-27 10:53:19 -05:00
Isaac Connor
4c35f2910c
fix ZM namespace
2019-02-26 18:09:18 -05:00
Isaac Connor
df3e11d83c
Fix authentication in api because we no longer store the user object in the session
2019-02-26 17:01:45 -05:00
Isaac Connor
fbdb5bcb62
Merge branch 'master' into storageareas
2019-02-19 12:06:32 -05:00
Isaac Connor
eaa7341935
Add missing / in path to auth.php
2019-02-19 10:07:36 -05:00
Isaac Connor
5029d7214a
Merge branch 'master' into storageareas
2019-02-18 17:00:45 -05:00
Isaac Connor
4cd3a93e96
add missing /
2019-02-18 16:30:03 -05:00
Mitch Capper
04c17283ec
need to prefix with _dir_ otherwise relative to initial script ( #2531 )
2019-02-17 11:31:10 -05:00
Isaac Connor
5060358870
Merge branch 'master' into storageareas
2018-12-29 09:56:53 -05:00
Andrew Bauer
3258d8e590
remove ZM_DIR_IMAGES ( #2374 )
2018-12-29 09:52:58 -05:00
Isaac Connor
27826b4aca
Merge branch 'master' into storageareas
2018-12-24 09:48:29 -05:00
Isaac Connor
47465260d1
Update permissions checking for Groups to not use session. Fixes #2353
2018-12-21 10:01:48 -05:00
Isaac Connor
e626049f6b
Merge branch 'swresample' into storageareas
2018-12-20 14:08:40 -05:00
Pliable Pixels
622c17f628
make sure auth is regenerated each time we call this API ( #2347 )
2018-12-16 11:02:07 -05:00
Isaac Connor
7d90a56561
Merge branch 'master' into storageareas
2018-11-30 14:46:42 -05:00
Pliable Pixels
e6b8a7bc66
resolves #2327
2018-11-29 09:21:10 -05:00
Isaac Connor
f5328265ef
fix missing daemons definition
2018-11-28 09:12:22 -05:00
Isaac Connor
51d8c0ea73
add back daemon parameter, but make it actually work
2018-11-14 12:59:44 -05:00
Isaac Connor
d671761a35
simplify params to daemonControl since they really aren't being used anyways. Return the status text
2018-11-14 12:54:10 -05:00
Andrew Bauer
073193e410
Merge pull request #2281 from connortechnology/fix_2279_delete_camera_through_api
...
Fix 2279 delete camera through api
2018-10-30 07:06:14 -05:00
Isaac Connor
39061038fb
Don't include related models in Storage index
2018-10-29 14:40:05 -04:00
Isaac Connor
9a2d58adce
We don't store all the permissions in the session anymore. We just use the global user object
2018-10-29 11:03:03 -04:00
Isaac Connor
8878397622
fix spacing
2018-10-20 11:36:25 -04:00
Andrew Bauer
409fd6aa6f
Merge pull request #2232 from connortechnology/fix_2229_getDiskPercent
...
Fix 2229 get disk percent
2018-10-03 18:11:28 -05:00
Isaac Connor
66221e39ab
rough in a StorageController for api
2018-10-03 11:22:51 -04:00
Isaac Connor
12bed9b6ac
Use alternate, working test for relative ZM_DIR_EVENTS. Don't use human output from du when specifying mid to be consistent.
2018-10-03 11:11:33 -04:00
Isaac Connor
03f09bdc48
Use defined CONFIG constants instead of looking up config from db
2018-10-03 10:56:02 -04:00
Isaac Connor
23ddc83ad4
fix_2167 ( #2168 )
...
* Populate a global from the session on every request. Use the object instead of using allowedMonitors in session.
* fix when gets loaded.
* use for auth, and add Monitor Edit checks to Zone add/delete/edit
* add back the ZM_OPT_USE_AUTH test for being logged in in AppController
* Update permissions code to use
* change quotes
* Update permission code to use
* Use instal of session for systemPermission
* deprecate montiorPermision in session
* use instead of session streamPermission
* move login code back into AppController. Has to be done for every request
* deprecate eventPermission, controlPermission and systemPermission in session.
* handle auth params in query string as well as post
* exit on HUP to free up memory.
* add missing global user
* system should be System
2018-08-08 09:59:46 -04:00
Isaac Connor
dc57a3c91c
fix spacing/quotes/google code style
2018-07-24 16:41:09 -04:00
Pliable Pixels
997aa6aa55
fixed getCredentials not working if called directly
2018-07-17 13:57:20 -04:00
Pliable Pixels
0ff9002adf
2156 api login ( #2157 )
...
* error can be due to bad user or password
* added login/logout and related private functions
* handle case when userLogin fails, current code returns PHP error for and API throw is not called
* formatting
* converted login params to POST, removed user=&pass= for other APIs
* formatting
* add auth check back but leave out login/out
* fixes to make it work across zmN, postman and curl
* added back enabled check
2018-07-15 21:17:35 -04:00
Isaac Connor
fe5ebe094d
More work just using auth.php instead of cake code. Don't reload the User object
2018-07-11 11:45:49 -04:00
Isaac Connor
4f80ca6871
Use userLogin function from auth.php instead of cake code.
2018-07-11 10:33:49 -04:00
Isaac Connor
983e3c45be
Fix spacing and quotes
2018-07-11 09:54:25 -04:00
Isaac Connor
f10509690b
add username and passwordHash to Session so that generateAuthHash works
2018-07-11 09:54:15 -04:00
Isaac Connor
21438d17ac
Fix authenticating User
2018-07-10 13:19:51 -04:00
Isaac Connor
930d929427
Merge branch 'storageareas' into api_auth
2018-07-10 12:46:30 -04:00
Isaac Connor
e04eac57ae
Include values in /etc/zm files in viewByName
2018-06-25 15:43:01 -04:00
Isaac Connor
24ceb75936
Merge branch 'master' into include_fs_config_in_api_config
2018-06-21 21:41:54 -04:00
Isaac Connor
cd64619743
Fix controlling daemon when the monitor is Local
2018-06-06 12:56:33 -04:00
Isaac Connor
2a5f05499e
Munge the config in the global configvals into the configs array before returning it.
2018-05-10 13:44:46 -04:00
Isaac Connor
62edca6dcb
add fileSize to the api, and use it to add remote fileSize reporting in includes/Event
2018-05-08 13:33:56 -07:00
Isaac Connor
1a012c62ff
Add fileExists to event view
2018-05-07 14:07:03 -07:00
Pliable Pixels
e953a04f61
naming consistency of attribute ( #2096 )
2018-05-03 14:03:49 -04:00