summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb.h')
-rw-r--r--src/db/sysdb.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 0f745ccb1..9e28b5c66 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -157,9 +157,10 @@
#define SYSDB_AD_ACCOUNT_EXPIRES "adAccountExpires"
#define SYSDB_AD_USER_ACCOUNT_CONTROL "adUserAccountControl"
+#define SYSDB_DEFAULT_VIEW_NAME "default"
+#define SYSDB_LOCAL_VIEW_NAME "LOCAL" /* reserved for client-side overrides */
#define SYSDB_VIEW_CLASS "view"
#define SYSDB_VIEW_NAME "viewName"
-#define SYSDB_DEFAULT_VIEW_NAME "default"
#define SYSDB_OVERRIDE_CLASS "overrride"
#define SYSDB_OVERRIDE_ANCHOR_UUID "overrideAnchorUUID"
#define SYSDB_OVERRIDE_USER_CLASS "userOverride"
@@ -473,6 +474,17 @@ static inline bool is_default_view(const char *view_name)
}
}
+static inline bool is_local_view(const char *view_name)
+{
+ /* NULL is treated as default */
+ if (view_name != NULL
+ && strcmp(view_name, SYSDB_LOCAL_VIEW_NAME) == 0) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
errno_t sysdb_delete_view_tree(struct sysdb_ctx *sysdb, const char *view_name);
errno_t sysdb_invalidate_overrides(struct sysdb_ctx *sysdb);