Toggle navigation
?
users online
Logout
Open hangout
Open chat for current file
:- use_module(library(clpfd)). % Relations authorized(User, Right, Timestamp) :- user_role(User, Role, URFrom, URTo), Timestamp #>= URFrom, Timestamp #< URTo, role_right(Role, Right, RRFrom, RRTo), Timestamp #>= RRFrom, Timestamp #< RRTo. % Example data user_role(damian, admin, 0, 300). user_role(kai, supervisor, 0, 150). user_role(nela, supervisor, 150, 300). user_role(anna, employee, 0, 200). user_role(reinier, employee, 100, 300). role_right(admin, _, 0, 300). role_right(supervisor, manage, 100, 200). role_right(supervisor, view, 0, 300). role_right(employee, view, 0, 300).