> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ar/web/access-control/change-role-in-user-profile.md).

# تغيير الدور في ملف المستخدم الشخصي

### يمكن تعديل دور المستخدم في ملفه الشخصي

تحتوي هذه المختبر على لوحة إدارة تقع في **/admin**، ويمكن الوصول إليها فقط للمستخدمين المتصلين الذين لديهم **roleid = 2**. / المهمة هي تعديل دورنا، والوصول إلى واجهة الإدارة وحذف المستخدم **carlos**.

1. نتصل باستخدام بيانات الاعتماد المقدمة:/ **wiener: peter**
2. في قسم الملف الشخصي، يتم إرسال تغيير عنوان البريد الإلكتروني عبر طلب JSON، على سبيل المثال:

```json
{
"email":"jordan@test.com"
}
```

تُعيد الاستجابة هذه البيانات مباشرةً إلى JSON، مما يدل على عدم تطبيق أي ترشيح صارم.

<figure><img src="/files/7adb51107c7de7455b2ff8b21df449972712e317" alt=""><figcaption></figcaption></figure>

من خلال حقن معلمة إضافية **roleid**، نختبر:

```json
{
"email":"jordan@test.com",
"roleid": 2
}
```

5. يقبل الخادم هذا التغيير ويُرجع **302 Found**، مما يؤكد أن دورنا قد تم تغييره إلى **2**.
6. بمجرد ترقيتنا إلى مدير، نتمكن من الوصول إلى **/admin**، حيث نستخدم ببساطة الوظيفة لـ **حذف المستخدم كارلوس** وبذلك نحل المختبر.

<figure><img src="/files/098bff4526b19952430b0ef1bc49602a4729a426" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ar/web/access-control/change-role-in-user-profile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
