Show admin button for the user with role 'admin' - yii

I created a role 'admin' using RBAC and now I need to show admin button in the main menu if logged in user has such a role. How can I realize that?

Related

How to disable change password option for other users?

I want to prevent the user from changing other users' passwords, so he can only change his own password
You need to do it in following way:
Create a security group. With this group of users, allow them to change passwords.
There are two ways to change passwords. One from the "Change Password" button in user form view and from the Action > Change Password. Both options are available from the Users form/tree view.
Inherit user form view and wizard action, provide groups which we have created in the first step.
Upgrade your module. Login with and without a special security group and you will notice that Change Password is only visible for special users who have security groups turned on.

SharePoint 2010 - How to enable New action to add a user into a group with STS user?

I'm a newbie with SP2010. I have a problem with menu toolbar in Group Permision
I has set up STS for user (Claim-based) to login to my website. I created a group called Super User (which has Full Control permission) programmatically and granted this group a user. Then using this user login to Website. Now when I go to Permission page and choose a group to view. In that group page, I realize that the New action menu does not exist. In order to add new user to the group, I have to go to Site Actions/Site Permissions and use Ribbon menu to add users to group. But my group Super User does not appear in Grant Permission dropdown list of the Grant Permission popup modal.
However if I login via Windows Authentication (domain account), I can see the New action menu and can add new user directly in this page.
In addition, if I view a predefined Group of SharePoint such as Owner, Member, Visitor, Designers... I can see the New action when login by STS User.
How can I enable the New action menu when I login with STS user?

`Settings` tab is missing in OpenERP-7

In OpenERP application Settings tab is missing, how do I get back this tab and I am using OpenERP-7.
You need to checkout access right of the User. Login with Admin User or any other User who can see the all list of Users. And open that User which don't see the Setting tab.
On User form view has Access Rights page. It has Application => Administration selection field. That might be empty.
So select Access Rights or Settings to Application => Administration
Save record and now login out with Admin and login with that updated User. You will see their Setting tab.

Hide the Form View in OpenErp (formally as Odoo)

How can I hide the Form View Based on User Access
I have created one user (student) in school Management System in openerp.
The Admin user is the default user in OpenErp. Admin have all the access rights to acees the Tree view and Form View while How can I restrict the the student user to view only
tree view.
My Question is how can i hide the Form View When the student user is logged into the system.I wanted to display only the the tree view when he or she is logged into the system while admin can display both the view like form and tree.
Okay for that you have to assign a groups.
First of all please create a group from Setting->Users->Groups
Then on creating group, click on access write where you have to add your object and give whatever access write you have to give
Then add users to a particular group.

How to know the user login

Using VB.Net and SQL Server 2005
I have a login page in Windows based application, Once login, in the next page the user name should display in the menu.
For Example,
In a Admin Login, the Admin should display in the MDI From menu
In a User Login, the User name should display in the MDI From menu
...
Need VB.Net Code Help
I presume that you have a table named Login and has three fields (username,password,role).
Pseudo code:
Fetch the role from the login table of given username and password.
If result is null then say "good bye" and exit from the system.
If result is "Admin" then instantiate/show the Admin MDI.
If result is "User" then open/show User MDI form.
Do you mean the name of the logged-in user?
User.Identity.Name