smavros
4c0d74a4a8
Adds new function for testing endpoints WIP:
...
- NewTestEndpoint() should replace TestEndpoint() since it is
returning an error in case that the code or the response is not
matching the expected one. The assertion __must__ be executed in the
body of the actual test (of the corresponding package) so the
printed error message can include the right number of line and the
file where the assertion failed.
- The function is used now only in package scenario tests.
2019-07-31 11:30:23 +02:00
Sonja Happ
1f5e64b9ea
Fixex for simulator POST/ PUT endpoints and simulator testing,
2019-07-24 16:39:59 +02:00
Sonja Happ
eb277fc92e
use jsondiff in endpoint testing
2019-07-24 13:17:47 +02:00
Sonja Happ
c33bcd0202
Fix password validation to work with testing DB entries
2019-07-04 15:50:48 +02:00
Sonja Happ
7edb27de2e
Merge branch 'user-validators'
...
# Conflicts:
# go.mod
# go.sum
# routes/user/userEndpoints.go
# routes/user/userMethods.go
2019-07-04 15:39:41 +02:00
Sonja Happ
304680603d
implement DELETE endpoint for files, cleanup
2019-07-04 10:34:54 +02:00
Sonja Happ
7c9318de8f
add testing for widget endpoints
2019-06-17 14:15:39 +02:00
smavros
b74b5f3a44
Fixes bug in getUsers(). Adds helper funnction.
2019-06-10 16:47:46 +02:00
Sonja Happ
b6c2d9fc6a
mode testEndpoint and authenticateForTest functions to common package
2019-06-05 16:21:46 +02:00
Sonja Happ
6081fab080
add permission checks to simulation model endpoints
2019-06-05 16:05:27 +02:00
Sonja Happ
072d948795
- checkPermissions method for simulation endpoints
...
- remove simulationID from simulationmodel and visualization endpoints
2019-06-05 14:34:44 +02:00
Sonja Happ
4806583b1f
Merge branch 'authentication'
...
# Conflicts:
# common/models.go
# common/utilities.go
# routes/user/userEndpoints.go
2019-06-05 10:42:49 +02:00
smavros
4cc98867ca
Merge branch 'authentication' of git.rwth-aachen.de:acs/public/villas/villasweb-backend-go into authentication
2019-06-05 10:03:49 +02:00
smavros
1b39f2fd83
Adds global constant strings for Context custom variables
2019-06-05 10:03:12 +02:00
Sonja Happ
d3cdf0008b
- rename Modes to Permissions
...
- rename actions.go to roles.go
- put all role related functions in file roles.go
2019-06-05 09:38:17 +02:00
smavros
e4c8fb9825
Renames IsActionAllowed() to ValidateRole()
2019-06-04 20:33:27 +02:00
smavros
5d3bb4c632
Improves actions mechanism in common package
...
- Typedefs the name of a model (ModelName) and the CRUD operations
(CRUD).
- Defines constants for models's names and the 4 CRUD operations
- Changes the corresponding functions that need to validate the role
2019-06-04 20:22:09 +02:00
smavros
1a1a3c1876
Adds IsActionAllowed() in common utilities
...
- Is used only in deleteUser handler function for now
2019-06-04 18:03:47 +02:00
Sonja Happ
786e36398b
implement model-specific methods instead of queries (WIP)
2019-05-28 16:41:30 +02:00
Sonja Happ
144c97ce49
Refactoring code base to new structure, removing circular dependencies, creating response types
2019-05-23 16:50:05 +02:00