schema: drop entity object types
SC_ENTITY_FOO is used instead of SC_FOO when a privilege is granted to an entire object class, not an individual object (object id is set to '' in the _priv system space). Introduction of this new concept made the access checking code rather confusing, especially the part converting entity types to object types and back, and complicated addition of new schema object types. Actually, there's no point in maintaining separate schema object types for entities. Instead, we can simply add a flag to the priv_def struct saying that the object id stored in the struct is meaningless and the privilege should be applied to an entire object class. This simplifies the code quite a bit and makes introduction of new schema object types must easier. Needed for #8803 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
Showing
- src/box/alter.cc 19 additions, 25 deletionssrc/box/alter.cc
- src/box/schema.h 0 additions, 5 deletionssrc/box/schema.h
- src/box/schema_def.c 0 additions, 32 deletionssrc/box/schema_def.c
- src/box/schema_def.h 8 additions, 28 deletionssrc/box/schema_def.h
- src/box/user.cc 27 additions, 59 deletionssrc/box/user.cc
- src/box/user_def.h 5 additions, 0 deletionssrc/box/user_def.h
Loading
Please register or sign in to comment