Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
040b0a5b
Commit
040b0a5b
authored
Jun 24, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
5c45bcff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
1 deletion
+95
-1
src/msg/wb/src/wb_pwrs_msg.msg
src/msg/wb/src/wb_pwrs_msg.msg
+3
-1
wb/lib/wb/src/wb_c_security.cpp
wb/lib/wb/src/wb_c_security.cpp
+92
-0
No files found.
src/msg/wb/src/wb_pwrs_msg.msg
View file @
040b0a5b
!
! Proview $Id: wb_pwrs_msg.msg,v 1.
3 2005-09-01 14:58:00
claes Exp $
! Proview $Id: wb_pwrs_msg.msg,v 1.
4 2008-06-24 07:40:16
claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
...
...
@@ -45,6 +45,8 @@ posattribute <an attribute or buffer object should be child to a ObjBodyDef obje
posobjbodydef <a body object should be child to a ClassDef object> /error
moveattribute <an attribute object can only be moved within the same childhood> /error
movebody <a body object can only be moved within the same childhood> /error
possecurity <a Security object should be a child to a $Node object> /error
securityalrex <a security object already exist> /error
...
...
wb/lib/wb/src/wb_c_security.cpp
0 → 100644
View file @
040b0a5b
/*
* Proview $Id: wb_c_security.cpp,v 1.1 2008-06-24 07:42:58 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/* wb_c_security.c -- work bench methods of the $Security class. */
#include <string.h>
#include "wb_pwrs.h"
#include "wb_pwrs_msg.h"
#include "wb_ldh.h"
static
pwr_tStatus
AnteCreate
(
ldh_tSesContext
Session
,
pwr_tObjid
Father
,
pwr_tClassId
Class
)
{
pwr_tCid
cid
;
pwr_tStatus
sts
;
pwr_tOid
oid
;
// ClassHier should be child to a $Node object
if
(
Father
.
oix
==
0
)
return
PWRS__POSSECURITY
;
sts
=
ldh_GetObjectClass
(
Session
,
Father
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
cid
!=
pwr_eClass_Node
)
return
PWRS__POSSECURITY
;
// There should only be one security object
sts
=
ldh_GetClassList
(
Session
,
pwr_eClass_Security
,
&
oid
);
if
(
ODD
(
sts
))
return
PWRS__SECURITYALREX
;
return
PWRS__SUCCESS
;
}
static
pwr_tStatus
AnteMove
(
ldh_tSesContext
Session
,
pwr_tObjid
Object
,
pwr_tObjid
Father
,
pwr_tObjid
OldFather
)
{
// Check that that the father is the same
if
(
!
(
Father
.
oix
==
OldFather
.
oix
&&
Father
.
vid
==
OldFather
.
vid
))
return
PWRS__POSSECURITY
;
return
PWRS__SUCCESS
;
}
static
pwr_tStatus
PostCreate
(
ldh_tSesContext
Session
,
pwr_tObjid
Object
,
pwr_tObjid
Father
,
pwr_tClassId
Class
)
{
pwr_tStatus
sts
;
// Set name to Security
sts
=
ldh_SetObjectName
(
Session
,
Object
,
"Security"
);
if
(
EVEN
(
sts
))
return
sts
;
return
PWRS__SUCCESS
;
}
pwr_dExport
pwr_BindMethods
(
$
Security
)
=
{
pwr_BindMethod
(
AnteCreate
),
pwr_BindMethod
(
AnteMove
),
pwr_BindMethod
(
PostCreate
),
pwr_NullMethod
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment