Go to file
jordi fita mas 052c9c8caa Add a function to set request settings and the role
I did not like the idea that it was the Go server who should set values
such as request.user or set the role, because this is mostly something
that only the database wants for itself, such as when calling logout.  I
am also planning to use these setings for row security with the user’s
id, that the Go application has no need for, but with the current
approach i would need to return it from check_cookie so that it can
return it back to the database when acquiring the connection.

I would have used the same function to set the settings and the role,
but security definer functions—obviously in retrospect—can not set the
role, because then could switch to any role of the user that defined the
function, not the roles they are member of.  Thus, a new function.

I did not want to do that every time i needed the database connection
within the same request, because it would perform the same operations
each time—it is the same cookie, afterall—, so new connections are
request scoped and passed along in the context.
2023-01-19 13:07:32 +01:00
cmd/numerus Implement login cookie, its verification, and logout 2023-01-17 20:58:13 +01:00
debian Change contractor to freelancer 2023-01-19 01:41:27 +01:00
demo Add the SQL for the demo 2023-01-17 22:30:01 +01:00
deploy Add a function to set request settings and the role 2023-01-19 13:07:32 +01:00
pkg Add a function to set request settings and the role 2023-01-19 13:07:32 +01:00
po Add Catalan and Spanish translation with gotext[3] 2023-01-18 20:26:30 +01:00
revert Add a function to set request settings and the role 2023-01-19 13:07:32 +01:00
test Add a function to set request settings and the role 2023-01-19 13:07:32 +01:00
verify Add a function to set request settings and the role 2023-01-19 13:07:32 +01:00
web Add Catalan and Spanish translation with gotext[3] 2023-01-18 20:26:30 +01:00
.gitignore Add Catalan and Spanish translation with gotext[3] 2023-01-18 20:26:30 +01:00
COPYING Rename LICENSE to COPYING 2023-01-15 04:08:35 +01:00
Makefile Add Catalan and Spanish translation with gotext[3] 2023-01-18 20:26:30 +01:00
go.mod Add Catalan and Spanish translation with gotext[3] 2023-01-18 20:26:30 +01:00
go.sum Add Catalan and Spanish translation with gotext[3] 2023-01-18 20:26:30 +01:00
sqitch.conf Setup authentication schema and user relation 2023-01-13 20:30:21 +01:00
sqitch.plan Add a function to set request settings and the role 2023-01-19 13:07:32 +01:00