def is_user_changing_own_key(self, req, user):
admin_detail = self.get_admin_detail(req)<EOL>if not admin_detail:<EOL><INDENT>return False<EOL><DEDENT>if '<STR_LIT>' not in (g['<STR_LIT:name>'] for g in admin_detail['<STR_LIT>']):<EOL><INDENT>if req.headers.get('<STR_LIT>') == '<STR_LIT:true>' orreq.headers.get('<STR_LIT>') == '<STR_LIT:true>':<EOL><INDENT>return False<EOL><DEDENT><DEDENT>if '<STR_LIT>' not in(g['<STR_LIT:name>'] for g in admin_detail['<STR_LIT>']) andreq.headers.get('<STR_LIT>') == '<STR_LIT:true>':<EOL><INDENT>return False<EOL><DEDENT>return req.headers.get('<STR_LIT>') == user andself.credentials_match(admin_detail,<EOL>req.headers.get('<STR_LIT>'))<EOL>
Check if the user is changing his own key.

        :param req: The swob.Request to check. This contains x-auth-admin-user
                    and x-auth-admin-key headers which are credentials of the
                    user sending the request.
        :param user: User whose password is to be changed.
        :returns: True if user is changing his own key, False if not.