Documentation ¶
Overview ¶
Package user contains the list of administrative user for the system. All users have accesses, into a profile and even extended access based upon table records. It needs context xmodule.
Index ¶
- Constants
- Variables
- func AddAccess(ds applications.Datasource, access *assets.Access) error
- func AddAccessGroup(ds applications.Datasource, accessgroup *assets.AccessGroup) error
- func AddUserParam(ds applications.Datasource, user int, param string, value interface{})
- func CloseSession(ds *base.Datasource, sessionid string) string
- func CreateSession(ds *base.Datasource, key int, sessionid string, IP string, origin string, ...) string
- func CreateSessionUser(ctx *context.Context, xds applications.Datasource, sessionid string, IP string, ...) string
- func CreateStructureUserByData(ds applications.Datasource, data xdominion.XRecordDef) base.Structure
- func CreateStructureUserByKey(ds applications.Datasource, key int) base.Structure
- func DelUserParam(ds applications.Datasource, user int, param string)
- func DestroySessionUser(ctx *context.Context, xds applications.Datasource, sessionid string)
- func GetAccessesList(ds applications.Datasource, cond *xdominion.XConditions, ...) *xdominion.XRecords
- func GetCountAccesses(ds applications.Datasource, cond *xdominion.XConditions) int
- func GetSession(ds *base.Datasource, sessionid string) *xdominion.XRecord
- func GetUserParam(ds applications.Datasource, user int, param string) string
- func GetUsersList(ds *base.Datasource) *xdominion.XRecords
- func HasAccess(ds applications.Datasource, clientid int, access string, extra string) bool
- func SetUserParam(ds applications.Datasource, user int, param string, value interface{})
- func Setup(ds applications.Datasource, prefix string) ([]string, error)
- func StartContext(ds applications.Datasource, ctx *context.Context) error
- func Synchronize(ds applications.Datasource, prefix string) ([]string, error)
- func VerifyUserSession(ctx *context.Context, xds applications.Datasource, origin string, ...)
- type StructureUser
Constants ¶
const ( MODULEID = "user" VERSION = "0.0.1" )
Variables ¶
var ModuleUser = assets.ModuleEntries{ GetAccessesCount: GetCountAccesses, GetAccessesList: GetAccessesList, HasAccess: HasAccess, SetUserParam: SetUserParam, AddUserParam: AddUserParam, GetUserParam: GetUserParam, DelUserParam: DelUserParam, }
var Needs = []string{"base"}
Functions ¶
func AddAccess ¶
func AddAccess(ds applications.Datasource, access *assets.Access) error
func AddAccessGroup ¶
func AddAccessGroup(ds applications.Datasource, accessgroup *assets.AccessGroup) error
func AddUserParam ¶
func AddUserParam(ds applications.Datasource, user int, param string, value interface{})
func CloseSession ¶
func CloseSession(ds *base.Datasource, sessionid string) string
func CreateSession ¶
func CreateSessionUser ¶
func CreateSessionUser(ctx *context.Context, xds applications.Datasource, sessionid string, IP string, origin string, device string, user *StructureUser) string
func CreateStructureUserByData ¶
func CreateStructureUserByData(ds applications.Datasource, data xdominion.XRecordDef) base.Structure
func CreateStructureUserByKey ¶
func CreateStructureUserByKey(ds applications.Datasource, key int) base.Structure
func DelUserParam ¶
func DelUserParam(ds applications.Datasource, user int, param string)
func DestroySessionUser ¶
func DestroySessionUser(ctx *context.Context, xds applications.Datasource, sessionid string)
func GetAccessesList ¶
func GetAccessesList(ds applications.Datasource, cond *xdominion.XConditions, orderby *xdominion.XOrderBy, quantity int, first int) *xdominion.XRecords
func GetCountAccesses ¶
func GetCountAccesses(ds applications.Datasource, cond *xdominion.XConditions) int
func GetSession ¶
func GetSession(ds *base.Datasource, sessionid string) *xdominion.XRecord
func GetUserParam ¶
func GetUserParam(ds applications.Datasource, user int, param string) string
func GetUsersList ¶
func GetUsersList(ds *base.Datasource) *xdominion.XRecords
GetUsersList to get a list of all the users
func HasAccess ¶
func HasAccess(ds applications.Datasource, clientid int, access string, extra string) bool
SECURITY Access
func SetUserParam ¶
func SetUserParam(ds applications.Datasource, user int, param string, value interface{})
func Setup ¶
func Setup(ds applications.Datasource, prefix string) ([]string, error)
InitModule is called during the init phase to link the module with the system adds tables and caches to sitecontext::database
func StartContext ¶
func StartContext(ds applications.Datasource, ctx *context.Context) error
func Synchronize ¶
func Synchronize(ds applications.Datasource, prefix string) ([]string, error)
func VerifyUserSession ¶
func VerifyUserSession(ctx *context.Context, xds applications.Datasource, origin string, device string)
SESSIONS
Types ¶
type StructureUser ¶
func GetUser ¶
func GetUser(ds *base.Datasource, key int) *StructureUser
GetCountry to get the data of a country from cache/db in the specified language
func GetUserByCredentials ¶
func GetUserByCredentials(ds *base.Datasource, username string, password string) *StructureUser
func (*StructureUser) Clone ¶
func (sm *StructureUser) Clone() base.Structure
Clone the whole structure
func (*StructureUser) ComplementData ¶
func (sm *StructureUser) ComplementData(ds applications.Datasource)
ComplementData adds all the needed data from other objects /duplicable in the thread since the object will be destroyed at the end
func (*StructureUser) GetData ¶
func (sm *StructureUser) GetData() *xdominion.XRecord
Returns the raw data
func (*StructureUser) IsAuthorized ¶
func (sm *StructureUser) IsAuthorized(ds applications.Datasource, site string, language string, device string) bool
IsAuthorized returns true if the structure can be used on this site/language/device
Source Files ¶
- access.go
- init.go
- messages.go
- parameters.go
- security.go
- session.go
- structure.go
- user.go
- user_access.go
- user_accessextended.go
- user_accessgroup.go
- user_parameter.go
- user_profile.go
- user_profileaccess.go
- user_profileaccessextended.go
- user_session.go
- user_sessionhistory.go
- user_user.go
- user_useraccess.go
- user_useraccessextended.go
- user_userprofile.go
- util.go