clean manage rights function (still override resources rights with path rights)