INPUT_FORMAT_WORKING_DRAFT.txt 1.37 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
# everything after a hash tag, until the newline, is considered a comment and ignored

# white space is ignored, this includes tabs and spaces and newline characters
# You      can put as much      white space anywhere and it will be ignored

# control chain: remove comments -> remove whitespace -> parse text into internal structure -> convert

# The order of the document doesn't matter: MaxRoles can be last, first, or somewhere in the middle and same goes for all the others

MaxRoles:        15 # roles count from 0 to MaxRoles - 1; represented below with 'role0' (without quotes, and the 0 can be replaced with any number in the appropriate range)
MaxTimeSlots:    10 # time slots count from 0 to MaxTimeSlots - 1; represented below with 't0' (without quotes, and the 0 can be replaced with any number in the appropriate range)

CanAssign {
    #<Admin role, starting timeslot - end timeslot for admin role, role preconditions, [time slot rule gives role to user for, another time slot (optional)...],role to give to the user>
    <role0,t0-t5,TRUE,[t1,t1],role1>		                    #(1)
    <role0,t0-t0,role1 & NOT role2 & role3,[t1,t2],role2>		#(2)
}

CanRevoke {
    # same as above
}

CanEnable {
    # same as above
}

CanDisable {
    # same as above
}

# Query: timeslot to check, [set of roles that the user must have in the timeslot (no NOTs allowed)]
Query: t0,[role1,role0,role2]