tailieunhanh - Practical JBoss Seam Projects 2007 phần 8

Có một vài trang mà người sử dụng có thể đến thăm trong khi chỉnh sửa một tiện ích của một hoặc nhiều loại, tính năng có thể đượcvì vậy để thay đổi cơ sở dữ liệu để được giống như cơ sở dữ liệu ứng dụng, chúng tôi sẽ cần phải đặt mộtTách thông tin của bạn vào các bảng khác nhau có một số lợi ích, và nó chắc chắn là đúng cách để | CHAPTER 6 SECURITY 149 public boolean login boolean result false if getUser null try Identity identity a uery t d from User Wre tdtig d eserName and password password .setyiryittit yiideNaii . set Parameter password identity i oyitetcIQI setuser User if getuser di l II Rd stea hi aser y to ty tiid n r Seam security system for Role r getUser .getRoles catch NoResultExceptlon nre .add Username password do not match result getUser N IM dd y 1 tdsi sead return result t eeeee user will have his or her own Identity. The additional code that we added to the Login component tells Seam that the user who just logged in has all of the roles that are associated with his orher userre rttl lhedatabase. Noticethats earn ures a shnplestringvahie for reurmg tire name property on asiltevaluelo t ahe antllhis property oe ma--p- e to r-ta ceaa . This is an important fact because oma names .hdwewdl ueeto ars nrofotbastd 150 CHAPTER 6 SECURITY SpccifyingPagcAuccss Rights Now that Seam knows the roles assigned to the user in the Gadget Catalog database we can use theseroles toassignrole-based access rights to pages and other parts of the Gadget Catalog. Page-levelauthorization canbe doneusingrestrictsubelemenlsonpageelomenls in pages. rioAe eante ekmeitf woureollon oiuireaulhenlicalionloermotain pages in ourapplicadon. AuthorizarionresOrictimne aremKfeusi edolitionaleonditions on thoirceri ty-relatedEn expeossionindie riotrl E hmndon s ha s Role lha. ean beusxdte check whether the current user has a particular role. According to tar securhyiequhsmeursUotzzl in tar iPcrir n GdbgxeurSalogi liipiritKin Tlrrougli oecurity wpenlywanl administrttoastzaicpha pgpnsro adgpt adWn0 pagps whfohnowsh mrhx a. isiinduecle ryoft .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
8    187    0    12-05-2024
23    162    0    12-05-2024
37    163    0    12-05-2024
28    116    0    12-05-2024
380    97    0    12-05-2024
6    104    0    12-05-2024
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.