Update Correct User - Flask Fridays #27

Опубликовано: 27 Декабрь 2024
на канале: Codemy.com
4,361
161

In this video we'll make sure only the correct user can update a user profile for our Flask Blog App.

First, we need to make sure that only logged in users can update user profiles.

Then we need to make sure that only the correct user can update a user profile.


Of course, the correct user is the logged in user. Or in other words, logged in users can only update their own profiles.


#flask #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:15 - Must Be Logged In To Update
2:10 - Determine ID Being Updated
3:15 - Output Updating ID To The Page
3:55 - Determine Logged-In User ID
4:45 - Compare User IDs
5:27 - Access Denied Message
5:58 - Test It Out
6:50 - Conclusion