The agreement will remain in effect for two weeks; the injunction says officers can use pepper spray if protests turn violent