Legality of the exercising of discretionary powers in administrative-legal relations