added admin context check and permissions check to sec_register_file(); fix for issue #50