access: rework struct credentials API
Struct credentials is a cache of user's universal privileges. It is static and is never changed after creation. That is a problem. If a user privileges are updated, it is not reflected in his existing credentials caches. This patch reworks credentials API so as now this struct is not just a container for several numbers. It is an object with standard methods like create(), destroy(). A credentials object still is not updated together with its source user, but now at least the API allows to fix that. Next patch will link all struct credentials of a user into a list via which the user will be able to keep the credentials up to date. Part of #2763 (cherry picked from commit a8c3ebdbfc97b72832ebc5d87b681a310cce9589) (cherry picked from commit 6b15dce614cfc3b14a12b66819737263a5089eaf)
Showing
- src/box/authentication.cc 1 addition, 2 deletionssrc/box/authentication.cc
- src/box/func.c 4 additions, 5 deletionssrc/box/func.c
- src/box/lua/session.c 3 additions, 3 deletionssrc/box/lua/session.c
- src/box/session.cc 5 additions, 5 deletionssrc/box/session.cc
- src/box/session.h 0 additions, 8 deletionssrc/box/session.h
- src/box/user.cc 22 additions, 0 deletionssrc/box/user.cc
- src/box/user.h 27 additions, 0 deletionssrc/box/user.h
Loading
Please register or sign in to comment