Select Git revision
-
Rob Swindell authored
Much easier and more accurate way to determine (via JS) if a specific user has a particular kind of access to a message sub-board or a file directory. This is accurate because it uses the 'userdat' functions under the hood, which check much more than just a single access requirement string against the user. Usage: bool can_access_sub(string sub_code or number sub_num [,'read', 'post', or 'operator']) bool can_access_dir(string dir_code or number dir_num [,'download', 'upload', or 'operator']) If no access string (second argument) is specified, then just generic "access" (e.g. for listing areas) is checked. The existing msg_area.sub[].can_access, can_read, can_post (and similar for file_area.dir[]) are still useful, but only for the current 'user'. If you want to check a different user's access to a sub-board or file directory, you really need to use these new User class methods.
Rob Swindell authoredMuch easier and more accurate way to determine (via JS) if a specific user has a particular kind of access to a message sub-board or a file directory. This is accurate because it uses the 'userdat' functions under the hood, which check much more than just a single access requirement string against the user. Usage: bool can_access_sub(string sub_code or number sub_num [,'read', 'post', or 'operator']) bool can_access_dir(string dir_code or number dir_num [,'download', 'upload', or 'operator']) If no access string (second argument) is specified, then just generic "access" (e.g. for listing areas) is checked. The existing msg_area.sub[].can_access, can_read, can_post (and similar for file_area.dir[]) are still useful, but only for the current 'user'. If you want to check a different user's access to a sub-board or file directory, you really need to use these new User class methods.