rcpp_framework/modules/rbac/rbac_model.h

38 lines
748 B
C
Raw Normal View History

#ifndef RBAC_MODEL_H
#define RBAC_MODEL_H
#include "core/http/model.h"
2021-11-01 16:39:30 +01:00
#include <map>
#include "core/containers/vector.h"
#include "core/string.h"
#include "rbac_permission.h"
#include "rbac_rank.h"
class RBACModel : public Model {
RCPP_OBJECT(RBACModel, Model);
public:
virtual std::map<int, Ref<RBACRank> > load_ranks();
2021-11-01 16:39:30 +01:00
virtual void save(const Ref<RBACRank> &rank);
virtual void save_rank(const Ref<RBACRank> &rank);
virtual void save_permission(const Ref<RBACPermission> &permission);
virtual int get_default_rank();
void create_table();
void drop_table();
void migrate();
virtual void create_default_entries();
static RBACModel *get_singleton();
RBACModel();
~RBACModel();
protected:
static RBACModel *_self;
};
#endif