Results 1 to 5 of 5

Thread: unauthorized web app but how alter records only for admin

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    258

    unauthorized web app but how alter records only for admin

    How to hide alter button but enable it logging in as admin?

    What and where had I configure anywhere?

    Thankful for a hint
    Georg

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Georg,

    Use a role. Admin will need to sign in.

    Regards,

    Yvonne

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    258
    thank you, Yvonne!
    so far it is clear. More accurate:
    I have set up unauthenticated access. For the general public, I would like to hide the Add and Edit symbols in the navigation bar and only show them for a specific user with a login. So only this user is allowed to change.

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Georg,

    You can use the Page hideActionBarButtons() method to control which buttons are displayed in the Page actionbar, e.g.

    Code:
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'activate' event
    function page1_activate()
    {
    	if (Lianja.evaluate("username()") == "admin") {
    		Lianja.get("page1").hideActionBarButtons("");
    	} else {
    		Lianja.get("page1").hideActionBarButtons("Add,Edit,Delete,Cancel,Save");
    	}
    };
    Regards,

    Yvonne

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    258
    Thank you very much, Yvonne!
    That is it what I was searching for.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us