And John Farrelli and Rites are true. The intercept-url patterns are mapped in that order. As soon as a match is found, the remaining specified patterns are ignored. This is why you should list more specific patterns earlier.
In your case, the pattern / users / profile / edit / somepage matches the pattern specified in the first intercept-url pattern, so Spring correctly checks to see if the user role has the access role. Apparently your EDIT_PROFILES users do not have VIEW_PROFILES authority, so they are denied access. Similarly, your intention to restrict access to. / Edit / users with EDIT_PROFILES privileges is undermined by an earlier expression that grants access to users with VIEW_PROFILES privileges.
Switch the order to an easy fix, and you probably want to grant the user EDIT_PROFILES the VIEW_PROFILES authority (in addition to the EDIT_PROFILES authority). Then consider using access="hasAnyRole('REQUIRED_ROLE')" rather than access="hasRole('REQUIRED_ROLE')" to simplify access instructions.
source share