الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Implementing Insert, Update, And Delete Allows

Featured Replies

بتاريخ:

oracle adf 11.1.2.3 

database 10g 

 

 

 

i have table have page name with privilege insert , update , delete 

  how can i implement this in my project security that will prevent user from update or delete depend on table roles 

 

any thing can help

 

بتاريخ:
  • كاتب الموضوع

 

oracle adf 11.1.2.3 

database 10g 

 

 

 

i have table have page name with privilege insert , update , delete 

  how can i implement this in my project security that will prevent user from update or delete depend on table roles 

 

any thing can help

 

بتاريخ:

من الممكن اخفاء وإظهار ال Buttons المسؤولة عن عمليات ال (Insert, Update, Delete)

حسب الصلاحيات المعطاة لكل مستخدم.

 

راجع هذا الموضوع  http://www.araboug.org/ib/index.php?showtopic=57657

تم تعديل بواسطة kherooooo

بتاريخ:

1/يمكن عمل stored procedure  في ال DB يستقبل اسم الشاشة ورقم المستخدم ويعطيout لمتغيرات الصلاحيات الثلاث المعروفة (flaginsertflag ,Updateflag,Deleteflag)

2/ نقوم بعمل ميثود ولتكن في الappmodule نقوم باستدعاء هذه الstored procedure ونضع المخرجات الثلاثة في session مثال:

public void getprev()
.
.
.
.
callableStatement.registerOutParameter(2, OracleTypes.Integer);
int inserflag= callableStatement.getIntn(2);.
.
.
FacesContext fctx = FacesContext.getCurrentInstance(); 
ExternalContext ectx = fctx.getExternalContext(); 
HttpSession userSession = (HttpSession) ectx.getSession(false); 
userSession.setAttribute("InsertAllowed", inserflag); 

3/ في الbean نعرف ثلاث متغيرات من نوع boolean وفي ال getter لكل واحد نستدعي المتغيرات من الsession ونتحقق اذا كانت =1 مثلا نرجع true والا false 

    boolean insertAllowed;
    
    public boolean isInsertAllowed()
    {
        FacesContext fctx = FacesContext.getCurrentInstance();
        ExternalContext ectx = fctx.getExternalContext();
        HttpSession userSession = (HttpSession) ectx.getSession(false);
        String insflag =userSession.getAttribute("InsertAllowed").toString();
        if (insflag.equals("1")) 
        {
            return true;
        }
        return false;
    } 

او يمكن تعريف المتغيرات الثلاثة ثم استدعاء الميثود السابقة في ال bean constractor لتعبئة هذه المتغيرات بالقيم

4/نضع الgetter ميثود في خاصية disabled لزر الاضافة وكذلك باقي الازرار كالتالي:

#{!backingBeanScope.page1.insertAllowed}

تم تعديل بواسطة visiterman

بتاريخ:
  • كاتب الموضوع

جزاكم الله خيرا
 

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.